diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index c9283eb7a540..192779a060e3 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs-mono-repo:latest - digest: sha256:24f0ac1c48a8e47fc924e06e5756c319af9a528745ace528df0d33204678e76c + digest: sha256:e8e6990de55638a07539109d3148e5a88fbedfee2d28742bad8c0f8fb2fbfafe diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a99f919055d6..dac6f7aef2c9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -11,7 +11,7 @@ "packages/google-area120-tables": "4.2.0", "packages/google-cloud-accessapproval": "4.2.0", "packages/google-cloud-advisorynotifications": "2.2.0", - "packages/google-cloud-aiplatform": "4.3.0", + "packages/google-cloud-aiplatform": "4.4.0", "packages/google-cloud-alloydb": "2.2.0", "packages/google-cloud-apigateway": "4.2.0", "packages/google-cloud-apigeeconnect": "4.2.0", @@ -29,7 +29,7 @@ "packages/google-cloud-bigquery-analyticshub": "2.3.0", "packages/google-cloud-bigquery-connection": "4.1.0", "packages/google-cloud-bigquery-dataexchange": "2.1.0", - "packages/google-cloud-bigquery-datapolicies": "2.1.0", + "packages/google-cloud-bigquery-datapolicies": "2.2.0", "packages/google-cloud-bigquery-datatransfer": "5.1.0", "packages/google-cloud-bigquery-migration": "2.1.0", "packages/google-cloud-bigquery-reservation": "4.1.0", @@ -42,7 +42,7 @@ "packages/google-cloud-commerce-consumer-procurement": "0.7.0", "packages/google-cloud-compute": "5.3.0", "packages/google-cloud-confidentialcomputing": "2.1.0", - "packages/google-cloud-config": "0.9.0", + "packages/google-cloud-config": "0.10.0", "packages/google-cloud-connectors": "0.5.0", "packages/google-cloud-contactcenterinsights": "4.1.0", "packages/google-cloud-contentwarehouse": "2.1.0", @@ -57,7 +57,7 @@ "packages/google-cloud-datastream": "4.2.0", "packages/google-cloud-deploy": "5.2.0", "packages/google-cloud-dialogflow": "7.2.0", - "packages/google-cloud-dialogflow-cx": "5.2.0", + "packages/google-cloud-dialogflow-cx": "5.3.0", "packages/google-cloud-discoveryengine": "2.3.0", "packages/google-cloud-dns": "5.3.0", "packages/google-cloud-documentai": "9.3.0", @@ -89,7 +89,7 @@ "packages/google-cloud-netapp": "0.13.0", "packages/google-cloud-networkconnectivity": "4.3.0", "packages/google-cloud-networkmanagement": "4.3.0", - "packages/google-cloud-networksecurity": "3.2.0", + "packages/google-cloud-networksecurity": "3.3.0", "packages/google-cloud-networkservices": "0.10.0", "packages/google-cloud-notebooks": "4.2.0", "packages/google-cloud-orchestration-airflow-service": "4.3.0", @@ -128,7 +128,7 @@ "packages/google-cloud-video-stitcher": "3.2.0", "packages/google-cloud-video-transcoder": "4.2.0", "packages/google-cloud-videointelligence": "6.2.0", - "packages/google-cloud-vision": "5.3.0", + "packages/google-cloud-vision": "5.3.1", "packages/google-cloud-vmmigration": "4.2.0", "packages/google-cloud-vmwareengine": "2.2.0", "packages/google-cloud-vpcaccess": "4.2.0", @@ -136,7 +136,7 @@ "packages/google-cloud-websecurityscanner": "4.2.0", "packages/google-cloud-workflows-executions": "4.4.0", "packages/google-cloud-workstations": "2.2.0", - "packages/google-container": "6.2.0", + "packages/google-container": "6.3.0", "packages/google-dataflow": "4.1.0", "packages/google-devtools-artifactregistry": "4.3.0", "packages/google-devtools-cloudbuild": "5.2.0", @@ -177,9 +177,9 @@ "packages/google-shopping-merchant-conversions": "0.4.0", "packages/google-maps-solar": "0.4.0", "packages/google-maps-routeoptimization": "0.5.0", - "packages/google-maps-fleetengine-delivery": "0.5.0", + "packages/google-maps-fleetengine-delivery": "0.6.0", "packages/google-streetview-publish": "0.4.0", - "packages/google-maps-fleetengine": "0.7.0", + "packages/google-maps-fleetengine": "0.8.0", "packages/google-shopping-merchant-promotions": "0.3.0", "packages/google-shopping-merchant-datasources": "0.6.0", "packages/google-cloud-managedkafka": "0.7.0", @@ -202,8 +202,10 @@ "packages/google-cloud-devicestreaming": "0.2.0", "packages/google-shopping-merchant-issueresolution": "0.1.0", "packages/google-shopping-merchant-ordertracking": "0.1.0", - "packages/google-cloud-lustre": "0.1.0", + "packages/google-cloud-lustre": "0.2.0", "packages/google-cloud-storagebatchoperations": "0.1.0", "packages/google-apps-events-subscriptions": "0.1.0", - "packages/google-cloud-maintenance-api": "0.1.0" + "packages/google-cloud-maintenance-api": "0.1.0", + "packages/google-cloud-managedkafka-schemaregistry": "0.1.0", + "packages/google-cloud-licensemanager": "0.1.0" } diff --git a/README.md b/README.md index e4f41097c462..49cb76906a8a 100644 --- a/README.md +++ b/README.md @@ -182,17 +182,22 @@ applications that interact with individual Google Cloud services: | [Google Maps Routing](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-routing) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@googlemaps/routing)](https://npm.im/@googlemaps/routing) | | [Google Marketing Platform Admin API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-marketingplatform-admin) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-ads/marketing-platform-admin)](https://npm.im/@google-ads/marketing-platform-admin) | | [Google Meet API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-apps-meet) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-apps/meet)](https://npm.im/@google-apps/meet) | +| [Google Workspace Events API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-apps-events-subscriptions) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/subscriptions)](https://npm.im/@google-cloud/subscriptions) | | [Last Mile Fleet Solution Delivery API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-fleetengine-delivery) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@googlemaps/fleetengine-delivery)](https://npm.im/@googlemaps/fleetengine-delivery) | | [Life Sciences](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-lifesciences) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/life-sciences)](https://npm.im/@google-cloud/life-sciences) | | [Local Rides and Deliveries API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-fleetengine) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@googlemaps/fleetengine)](https://npm.im/@googlemaps/fleetengine) | +| [Maintenance API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-maintenance-api) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/maintenance-api)](https://npm.im/@google-cloud/maintenance-api) | +| [Managed Lustre API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-lustre) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/lustre)](https://npm.im/@google-cloud/lustre) | | [Managed Service for Apache Kafka API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-managedkafka) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/managedkafka)](https://npm.im/@google-cloud/managedkafka) | | [Memorystore API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-memorystore) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/memorystore)](https://npm.im/@google-cloud/memorystore) | | [Memorystore for Redis API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-redis-cluster) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/redis-cluster)](https://npm.im/@google-cloud/redis-cluster) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-accounts) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/accounts)](https://npm.im/@google-shopping/accounts) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-conversions) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/conversions)](https://npm.im/@google-shopping/conversions) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-datasources) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/datasources)](https://npm.im/@google-shopping/datasources) | +| [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-issueresolution) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/issueresolution)](https://npm.im/@google-shopping/issueresolution) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-lfp) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/lfp)](https://npm.im/@google-shopping/lfp) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-notifications) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/notifications)](https://npm.im/@google-shopping/notifications) | +| [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-ordertracking) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/ordertracking)](https://npm.im/@google-shopping/ordertracking) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-products) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/products)](https://npm.im/@google-shopping/products) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-promotions) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/promotions)](https://npm.im/@google-shopping/promotions) | | [Merchant API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-quota) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-shopping/quota)](https://npm.im/@google-shopping/quota) | @@ -211,6 +216,7 @@ applications that interact with individual Google Cloud services: | [Profiler API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-devtools-cloudprofiler) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/cloudprofiler)](https://npm.im/@google-cloud/cloudprofiler) | | [Route Optimization API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-routeoptimization) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@googlemaps/routeoptimization)](https://npm.im/@googlemaps/routeoptimization) | | [Solar API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-solar) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@googlemaps/solar)](https://npm.im/@googlemaps/solar) | +| [Storage Batch Operations API](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storagebatchoperations) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/storagebatchoperations)](https://npm.im/@google-cloud/storagebatchoperations) | | [Trace](https://github.com/googleapis/cloud-trace-nodejs) | [![Preview][preview-stability]][launch-stages] | [![npm](https://img.shields.io/npm/v/@google-cloud/trace-agent)](https://npm.im/@google-cloud/trace-agent) | diff --git a/changelog.json b/changelog.json index 35b57b048a25..c9305079bfbf 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,217 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "06390df47b477de5a89ecc4bc525372865d62cc3", + "message": "Add initial files for google.cloud.licensemanager.v1", + "issues": [ + "6493" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/licensemanager", + "id": "179c2bc7-ae60-443d-ac9f-e27ccc86169b", + "createTime": "2025-07-17T01:18:58.823Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "75c7785f7fd37fb0129d75f5bfdd28a332c81037", + "message": "Add initial files for google.cloud.managedkafka.schemaregistry.v1", + "issues": [ + "6476" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/managedkafka-schemaregistry", + "id": "320ca86d-0db0-4881-b476-a9ec4bff8ed6", + "createTime": "2025-07-17T01:18:58.802Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "b127b20f0def69757a57519d1cc656e134f37ad6", + "message": "Add a new instance state UPDATING", + "issues": [] + } + ], + "version": "0.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/lustre", + "id": "9485282c-d8b1-4410-aea5-70e7187d5b82", + "createTime": "2025-07-17T01:18:58.779Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ebf2538352a7b9bf92f100ff1cabdb9ab58e1c4d", + "message": "[fleetengine] add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version", + "issues": [ + "6481" + ] + } + ], + "version": "0.8.0", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/fleetengine", + "id": "5dba8039-5316-4c45-9c74-b64e2b4771ab", + "createTime": "2025-07-17T01:18:58.758Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "51493a701fab76e1598048fc879eb1c31a3313b9", + "message": "[fleetengine-delivery] add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version", + "issues": [ + "6482" + ] + } + ], + "version": "0.6.0", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/fleetengine-delivery", + "id": "6af394da-1aac-46bd-883a-8601361617cf", + "createTime": "2025-07-17T01:18:58.735Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c46a08f885753f84cdc0bb9b609820f9be0114ad", + "message": "[container] A new enum `TransparentHugepageEnabled` is added", + "issues": [ + "6496" + ] + } + ], + "version": "6.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "64d8670b-ce30-4caf-8e65-4287961660f6", + "createTime": "2025-07-17T01:18:58.715Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "6ac1df8ff2e813499c8f4f2248ed3b8b16193446", + "message": "Update dependency redis to ~5.6.0", + "issues": [ + "6469" + ], + "scope": "deps" + } + ], + "version": "5.3.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/vision", + "id": "30debead-6e07-48eb-ad06-9803219d0106", + "createTime": "2025-07-17T01:18:58.691Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "971ea02c65b80f9d92340935f619d1e2e320ce83", + "message": "[networksecurity] publish v1alpha1 Network Security API client and ClientTlsPolicy API resource", + "issues": [ + "6486" + ] + } + ], + "version": "3.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/network-security", + "id": "a33fc2d1-cee0-441b-88a2-621a5328d873", + "createTime": "2025-07-17T01:18:58.671Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "02a74ee2eaa244dbb70b33b94e7884878a1457e2", + "message": "[dialogflow-cx] Add support for generator settings on fulfillment", + "issues": [ + "6466" + ] + } + ], + "version": "5.3.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow-cx", + "id": "5cbca282-c36e-4241-982e-7b7d2a2f32a8", + "createTime": "2025-07-17T01:18:58.647Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "c949b3f677349035c669b1052ce49f0f8a6fbf06", + "message": "[infra-manager] added resource change and drift details for the preview", + "issues": [ + "6475" + ] + } + ], + "version": "0.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/config", + "id": "30136d11-cbac-408e-a82c-adb54311871e", + "createTime": "2025-07-17T01:18:58.614Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e30eb7c9ca1a668d02aa46e7197ac21414e8250f", + "message": "[bigquery-datapolicies] Release v2beta1 version containing Data Policy on Column", + "issues": [ + "6480" + ] + } + ], + "version": "2.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-datapolicies", + "id": "9bdbbb86-1f74-4614-918f-4b3742c37aaa", + "createTime": "2025-07-17T01:18:58.580Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "a71d814de86954fa3fae816cd6e63be842d84dca", + "message": "Add API for Managed OSS Fine Tuning", + "issues": [ + "6494" + ] + }, + { + "type": "feat", + "sha": "d5d55738b1e2a07f0942041654588cf012cde3e7", + "message": "Add Aggregation Output in EvaluateDataset Get Operation Response", + "issues": [ + "6474" + ] + } + ], + "version": "4.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "42e45b1d-a936-416c-adc2-ff3548148bf2", + "createTime": "2025-07-17T01:18:58.548Z" + }, { "changes": [ { @@ -59140,5 +59351,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2025-07-09T00:06:47.630Z" + "updateTime": "2025-07-17T01:18:58.823Z" } \ No newline at end of file diff --git a/libraries.json b/libraries.json index 2f463f5a91af..829d31d23b1b 100644 --- a/libraries.json +++ b/libraries.json @@ -3135,6 +3135,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-apps-meet", "support_documentation": "https://developers.google.com/meet/api/guides/overview/docs/getting-support" }, + { + "name": "workspaceevents", + "name_pretty": "Google Workspace Events API", + "product_documentation": "https://developers.google.com/workspace/events", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/workspaceevents/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/subscriptions", + "api_id": "workspaceevents.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "workspaceevents", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-apps-events-subscriptions", + "support_documentation": "https://developers.google.com/workspace/events/docs/getting-support" + }, { "name": "fleetengine-delivery", "name_pretty": "Last Mile Fleet Solution Delivery API", @@ -3189,6 +3207,42 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-fleetengine", "support_documentation": "https://developers.google.com/maps/documentation/transportation-logistics/mobility/docs/getting-support" }, + { + "name": "maintenance", + "name_pretty": "Maintenance API", + "product_documentation": "https://cloud.google.com/unified-maintenance/docs/overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/maintenance/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/maintenance-api", + "api_id": "maintenance.googleapis.com", + "default_version": "v1beta", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "maintenance", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-maintenance-api", + "support_documentation": "https://cloud.google.com/unified-maintenance/docs/getting-support" + }, + { + "name": "lustre", + "name_pretty": "Managed Lustre API", + "product_documentation": "https://cloud.google.com/managed-lustre/docs", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/lustre/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/lustre", + "api_id": "lustre.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "lustre", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-lustre", + "support_documentation": "https://cloud.google.com/managed-lustre/docs/getting-support" + }, { "name": "managedkafka", "name_pretty": "Managed Service for Apache Kafka API", @@ -3297,6 +3351,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-datasources", "support_documentation": "https://developers.google.com/merchant/api/docs/getting-support" }, + { + "name": "merchantapi", + "name_pretty": "Merchant API", + "product_documentation": "https://developers.google.com/merchant/api", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/merchantapi/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-shopping/issueresolution", + "api_id": "merchantapi.googleapis.com", + "default_version": "v1beta", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "merchantapi", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-issueresolution", + "support_documentation": "https://developers.google.com/merchant/api/docs/getting-support" + }, { "name": "merchantapi", "name_pretty": "Merchant API", @@ -3333,6 +3405,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-notifications", "support_documentation": "https://developers.google.com/merchant/api/docs/getting-support" }, + { + "name": "merchantapi", + "name_pretty": "Merchant API", + "product_documentation": "https://developers.google.com/merchant/api", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/merchantapi/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-shopping/ordertracking", + "api_id": "merchantapi.googleapis.com", + "default_version": "v1beta", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "merchantapi", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-shopping-merchant-ordertracking", + "support_documentation": "https://developers.google.com/merchant/api/docs/getting-support" + }, { "name": "merchantapi", "name_pretty": "Merchant API", @@ -3657,6 +3747,24 @@ "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-maps-solar", "support_documentation": "https://developers.google.com/maps/documentation/solar/overview/docs/getting-support" }, + { + "name": "storagebatchoperations", + "name_pretty": "Storage Batch Operations API", + "product_documentation": "https://cloud.google.com/storage/docs/batch-operations/overview", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/storagebatchoperations/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/storagebatchoperations", + "api_id": "storagebatchoperations.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "storagebatchoperations", + "linkToRepoHomepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-storagebatchoperations", + "support_documentation": "https://cloud.google.com/storage/docs/getting-support" + }, { "name": "trace", "name_pretty": "Trace", diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index 59957d52d5c2..b94f53d0bc6d 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [4.4.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v4.3.0...aiplatform-v4.4.0) (2025-07-17) + + +### Features + +* Add Aggregation Output in EvaluateDataset Get Operation Response ([#6474](https://github.com/googleapis/google-cloud-node/issues/6474)) ([d5d5573](https://github.com/googleapis/google-cloud-node/commit/d5d55738b1e2a07f0942041654588cf012cde3e7)) +* Add API for Managed OSS Fine Tuning ([#6494](https://github.com/googleapis/google-cloud-node/issues/6494)) ([a71d814](https://github.com/googleapis/google-cloud-node/commit/a71d814de86954fa3fae816cd6e63be842d84dca)) + ## [4.3.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v4.2.0...aiplatform-v4.3.0) (2025-07-09) diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index 3aa78d26505e..e53c3c88f7a3 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "4.3.0", + "version": "4.4.0", "description": "Vertex AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto index 6da218472a25..3716216d9fae 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1/pipeline_job.proto @@ -361,6 +361,16 @@ message PipelineTaskDetail { // Output only. The runtime output artifacts of the task. map outputs = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The unique name of a task. + // This field is used by rerun pipeline job. + // Console UI and Vertex AI SDK will support triggering pipeline job reruns. + // The name is constructed by concatenating all the parent tasks name with + // the task name. For example, if a task named "child_task" has a parent task + // named "parent_task_1" and parent task 1 has a parent task named + // "parent_task_2", the task unique name will be + // "parent_task_2.parent_task_1.child_task". + string task_unique_name = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The runtime detail of a pipeline executor. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto index f048d98e4891..f4a30cec634a 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/evaluation_service.proto @@ -85,6 +85,11 @@ message EvaluateDatasetOperationMetadata { // Response in LRO for EvaluationService.EvaluateDataset. message EvaluateDatasetResponse { + // Output only. Aggregation statistics derived from results of + // EvaluationService.EvaluateDataset. + AggregationOutput aggregation_output = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Output info for EvaluationService.EvaluateDataset. OutputInfo output_info = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -99,6 +104,39 @@ message OutputInfo { } } +// The aggregation result for the entire dataset and all metrics. +message AggregationOutput { + // The dataset used for evaluation & aggregation. + EvaluationDataset dataset = 1; + + // One AggregationResult per metric. + repeated AggregationResult aggregation_results = 2; +} + +// The aggregation result for a single metric. +message AggregationResult { + // The aggregation result. + oneof aggregation_result { + // Result for pointwise metric. + PointwiseMetricResult pointwise_metric_result = 5; + + // Result for pairwise metric. + PairwiseMetricResult pairwise_metric_result = 6; + + // Results for exact match metric. + ExactMatchMetricValue exact_match_metric_value = 7; + + // Results for bleu metric. + BleuMetricValue bleu_metric_value = 8; + + // Results for rouge metric. + RougeMetricValue rouge_metric_value = 9; + } + + // Aggregation metric. + Metric.AggregationMetric aggregation_metric = 4; +} + // Request message for EvaluationService.EvaluateDataset. message EvaluateDatasetRequest { // Required. The resource name of the Location to evaluate the dataset. @@ -141,34 +179,34 @@ message Metric { // Unspecified aggregation metric. AGGREGATION_METRIC_UNSPECIFIED = 0; - // Average aggregation metric. + // Average aggregation metric. Not supported for Pairwise metric. AVERAGE = 1; // Mode aggregation metric. MODE = 2; - // Standard deviation aggregation metric. + // Standard deviation aggregation metric. Not supported for pairwise metric. STANDARD_DEVIATION = 3; - // Variance aggregation metric. + // Variance aggregation metric. Not supported for pairwise metric. VARIANCE = 4; - // Minimum aggregation metric. + // Minimum aggregation metric. Not supported for pairwise metric. MINIMUM = 5; - // Maximum aggregation metric. + // Maximum aggregation metric. Not supported for pairwise metric. MAXIMUM = 6; - // Median aggregation metric. + // Median aggregation metric. Not supported for pairwise metric. MEDIAN = 7; - // 90th percentile aggregation metric. + // 90th percentile aggregation metric. Not supported for pairwise metric. PERCENTILE_P90 = 8; - // 95th percentile aggregation metric. + // 95th percentile aggregation metric. Not supported for pairwise metric. PERCENTILE_P95 = 9; - // 99th percentile aggregation metric. + // 99th percentile aggregation metric. Not supported for pairwise metric. PERCENTILE_P99 = 10; } @@ -216,9 +254,9 @@ message AutoraterConfig { // is 32. optional int32 sampling_count = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Whether to flip the candidate and baseline responses. - // This is only applicable to the pairwise metric. If enabled, also provide - // PairwiseMetricSpec.candidate_response_field_name and + // Optional. Default is true. Whether to flip the candidate and baseline + // responses. This is only applicable to the pairwise metric. If enabled, also + // provide PairwiseMetricSpec.candidate_response_field_name and // PairwiseMetricSpec.baseline_response_field_name. When rendering // PairwiseMetricSpec.metric_prompt_template, the candidate and baseline // fields will be flipped for half of the samples to reduce bias. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto index b25e56a80ca4..23eafcfd6b9d 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/machine_resources.proto @@ -19,6 +19,7 @@ package google.cloud.aiplatform.v1beta1; import "google/api/field_behavior.proto"; import "google/cloud/aiplatform/v1beta1/accelerator_type.proto"; import "google/cloud/aiplatform/v1beta1/reservation_affinity.proto"; +import "google/protobuf/duration.proto"; option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; @@ -73,35 +74,31 @@ message MachineSpec { ]; } -// A description of resources that are dedicated to a DeployedModel, and -// that need a higher degree of manual configuration. +// A description of resources that are dedicated to a DeployedModel or +// DeployedIndex, and that need a higher degree of manual configuration. message DedicatedResources { - // Required. Immutable. The specification of a single machine used by the - // prediction. + // Required. Immutable. The specification of a single machine being used. MachineSpec machine_spec = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; - // Required. Immutable. The minimum number of machine replicas this - // DeployedModel will be always deployed on. This value must be greater than - // or equal to 1. + // Required. Immutable. The minimum number of machine replicas that will be + // always deployed on. This value must be greater than or equal to 1. // - // If traffic against the DeployedModel increases, it may dynamically be - // deployed onto more replicas, and as traffic decreases, some of these extra - // replicas may be freed. + // If traffic increases, it may dynamically be deployed onto more replicas, + // and as traffic decreases, some of these extra replicas may be freed. int32 min_replica_count = 2 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; - // Immutable. The maximum number of replicas this DeployedModel may be - // deployed on when the traffic against it increases. If the requested value - // is too large, the deployment will error, but if deployment succeeds then - // the ability to scale the model to that many replicas is guaranteed (barring - // service outages). If traffic against the DeployedModel increases beyond - // what its replicas at maximum may handle, a portion of the traffic will be - // dropped. If this value is not provided, will use + // Immutable. The maximum number of replicas that may be deployed on when the + // traffic against it increases. If the requested value is too large, the + // deployment will error, but if deployment succeeds then the ability to scale + // to that many replicas is guaranteed (barring service outages). If traffic + // increases beyond what its replicas at maximum may handle, a portion of the + // traffic will be dropped. If this value is not provided, will use // [min_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.min_replica_count] // as the default value. // @@ -112,8 +109,8 @@ message DedicatedResources { int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE]; // Optional. Number of required available replicas for the deployment to - // succeed. This field is only needed when partial model deployment/mutation - // is desired. If set, the model deploy/mutate operation will succeed once + // succeed. This field is only needed when partial deployment/mutation is + // desired. If set, the deploy/mutate operation will succeed once // available_replica_count reaches required_replica_count, and the rest of // the replicas will be retried. If not set, the default // required_replica_count will be min_replica_count. @@ -148,29 +145,36 @@ message DedicatedResources { // Optional. If true, schedule the deployment workload on [spot // VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms). bool spot = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Immutable. If set, use DWS resource to schedule the deployment + // workload. reference: + // (https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler) + FlexStart flex_start = 10 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; } // A description of resources that to large degree are decided by Vertex AI, // and require only a modest additional configuration. // Each Model supporting these resources documents its specific guidelines. message AutomaticResources { - // Immutable. The minimum number of replicas this DeployedModel will be always - // deployed on. If traffic against it increases, it may dynamically be - // deployed onto more replicas up to + // Immutable. The minimum number of replicas that will be always deployed on. + // If traffic against it increases, it may dynamically be deployed onto more + // replicas up to // [max_replica_count][google.cloud.aiplatform.v1beta1.AutomaticResources.max_replica_count], // and as traffic decreases, some of these extra replicas may be freed. If the // requested value is too large, the deployment will error. int32 min_replica_count = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Immutable. The maximum number of replicas this DeployedModel may be - // deployed on when the traffic against it increases. If the requested value - // is too large, the deployment will error, but if deployment succeeds then - // the ability to scale the model to that many replicas is guaranteed (barring - // service outages). If traffic against the DeployedModel increases beyond - // what its replicas at maximum may handle, a portion of the traffic will be - // dropped. If this value is not provided, a no upper bound for scaling under - // heavy traffic will be assume, though Vertex AI may be unable to scale - // beyond certain replica number. + // Immutable. The maximum number of replicas that may be deployed on when the + // traffic against it increases. If the requested value is too large, the + // deployment will error, but if deployment succeeds then the ability to scale + // to that many replicas is guaranteed (barring service outages). If traffic + // increases beyond what its replicas at maximum may handle, a portion of the + // traffic will be dropped. If this value is not provided, a no upper bound + // for scaling under heavy traffic will be assume, though Vertex AI may be + // unable to scale beyond certain replica number. int32 max_replica_count = 2 [(google.api.field_behavior) = IMMUTABLE]; } @@ -203,9 +207,10 @@ message ResourcesConsumed { // Represents the spec of disk options. message DiskSpec { - // Type of the boot disk (default is "pd-ssd"). - // Valid values: "pd-ssd" (Persistent Disk Solid State Drive) or - // "pd-standard" (Persistent Disk Hard Disk Drive). + // Type of the boot disk. For non-A3U machines, the default value is + // "pd-ssd", for A3U machines, the default value is "hyperdisk-balanced". + // Valid values: "pd-ssd" (Persistent Disk Solid State Drive), + // "pd-standard" (Persistent Disk Hard Disk Drive) or "hyperdisk-balanced". string boot_disk_type = 1; // Size in GB of the boot disk (default is 100GB). @@ -273,3 +278,12 @@ message ShieldedVmConfig { // boot process if signature verification fails. bool enable_secure_boot = 1; } + +// FlexStart is used to schedule the deployment workload on DWS resource. It +// contains the max duration of the deployment. +message FlexStart { + // The max duration of the deployment is max_runtime_duration. The + // deployment will be terminated after the duration. The + // max_runtime_duration can be set up to 7 days. + google.protobuf.Duration max_runtime_duration = 1; +} diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto index 96ccae50c04b..d633962168bf 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto @@ -219,6 +219,17 @@ message ListPublisherModelsResponse { // Request message for // [ModelGardenService.Deploy][google.cloud.aiplatform.v1beta1.ModelGardenService.Deploy]. message DeployRequest { + // The custom model to deploy from model weights in a Google Cloud Storage URI + // or Model Registry model. + message CustomModel { + // The source of the custom model. + oneof model_source { + // Immutable. The Google Cloud Storage URI of the custom model, storing + // weights and config files (which can be used to infer the base model). + string gcs_uri = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + } + // The model config to use for the deployment. message ModelConfig { // Optional. Whether the user accepts the End User License Agreement (EULA) @@ -292,6 +303,9 @@ message DeployRequest { // The Hugging Face model to deploy. // Format: Hugging Face model ID like `google/gemma-2-2b-it`. string hugging_face_model_id = 2; + + // The custom model to deploy from a Google Cloud Storage URI. + CustomModel custom_model = 3; } // Required. The resource name of the Location to deploy the model in. diff --git a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tuning_job.proto b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tuning_job.proto index 46ed03ba34aa..222054e2fecb 100644 --- a/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tuning_job.proto +++ b/packages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/tuning_job.proto @@ -75,6 +75,14 @@ message TuningJob { // [TuningJob][google.cloud.aiplatform.v1.TuningJob]. string description = 3 [(google.api.field_behavior) = OPTIONAL]; + // Optional. The user-provided path to custom model weights. Set this field + // to tune a custom model. The path must be a Cloud Storage directory that + // contains the model weights in .safetensors format along with associated + // model metadata files. If this field is set, the base_model field must still + // be set to indicate which base model the custom model is derived from. This + // feature is only available for open source models. + string custom_base_model = 26 [(google.api.field_behavior) = OPTIONAL]; + // Output only. The detailed state of the job. JobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -158,13 +166,26 @@ message TuningJob { // Users starting the pipeline must have the `iam.serviceAccounts.actAs` // permission on this service account. string service_account = 22; + + // Optional. Cloud Storage path to the directory where tuning job outputs are + // written to. This field is only available and required for open source + // models. + string output_uri = 25 [(google.api.field_behavior) = OPTIONAL]; } // The Model Registry Model and Online Prediction Endpoint associated with // this [TuningJob][google.cloud.aiplatform.v1.TuningJob]. message TunedModel { // Output only. The resource name of the TunedModel. Format: - // `projects/{project}/locations/{location}/models/{model}`. + // + // `projects/{project}/locations/{location}/models/{model}@{version_id}` + // + // When tuning from a base model, the version_id will be 1. + // + // For continuous tuning, the version id will be incremented by 1 from the + // last version id in the parent model. E.g., + // `projects/{project}/locations/{location}/models/{model}@{last_version_id + + // 1}` string model = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { @@ -412,20 +433,44 @@ message SupervisedHyperParameters { int64 epoch_count = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Multiplier for adjusting the default learning rate. + // Mutually exclusive with `learning_rate`. double learning_rate_multiplier = 2 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Learning rate for tuning. + // Mutually exclusive with `learning_rate_multiplier`. + // This feature is only available for open source models. + double learning_rate = 6 [(google.api.field_behavior) = OPTIONAL]; + // Optional. Adapter size for tuning. AdapterSize adapter_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Batch size for tuning. + // This feature is only available for open source models. + int64 batch_size = 5 [(google.api.field_behavior) = OPTIONAL]; } // Tuning Spec for Supervised Tuning for first party models. message SupervisedTuningSpec { - // Required. Cloud Storage path to file containing training dataset for - // tuning. The dataset must be formatted as a JSONL file. + // Supported tuning modes. + enum TuningMode { + // Tuning mode is unspecified. + TUNING_MODE_UNSPECIFIED = 0; + + // Full fine-tuning mode. + TUNING_MODE_FULL = 1; + + // PEFT adapter tuning mode. + TUNING_MODE_PEFT_ADAPTER = 2; + } + + // Required. Training dataset used for tuning. The dataset can be specified as + // either a Cloud Storage path to a JSONL file or as the resource name of a + // Vertex Multimodal Dataset. string training_dataset_uri = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. Cloud Storage path to file containing validation dataset for - // tuning. The dataset must be formatted as a JSONL file. + // Optional. Validation dataset used for tuning. The dataset can be specified + // as either a Cloud Storage path to a JSONL file or as the resource name of a + // Vertex Multimodal Dataset. string validation_dataset_uri = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Hyperparameters for SFT. @@ -436,6 +481,9 @@ message SupervisedTuningSpec { // the last checkpoint will be exported. Otherwise, enable intermediate // checkpoints for SFT. Default is false. bool export_last_checkpoint_only = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Tuning mode. + TuningMode tuning_mode = 7; } // Tuning Spec for Distillation. diff --git a/packages/google-cloud-aiplatform/protos/protos.d.ts b/packages/google-cloud-aiplatform/protos/protos.d.ts index 9cbb9bf8a33a..783703f78d33 100644 --- a/packages/google-cloud-aiplatform/protos/protos.d.ts +++ b/packages/google-cloud-aiplatform/protos/protos.d.ts @@ -111102,6 +111102,9 @@ export namespace google { /** PipelineTaskDetail outputs */ outputs?: ({ [k: string]: google.cloud.aiplatform.v1.PipelineTaskDetail.IArtifactList }|null); + + /** PipelineTaskDetail taskUniqueName */ + taskUniqueName?: (string|null); } /** Represents a PipelineTaskDetail. */ @@ -111152,6 +111155,9 @@ export namespace google { /** PipelineTaskDetail outputs. */ public outputs: { [k: string]: google.cloud.aiplatform.v1.PipelineTaskDetail.IArtifactList }; + /** PipelineTaskDetail taskUniqueName. */ + public taskUniqueName: string; + /** * Creates a new PipelineTaskDetail instance using the specified properties. * @param [properties] Properties to set @@ -145994,6 +146000,9 @@ export namespace google { /** DedicatedResources spot */ spot?: (boolean|null); + + /** DedicatedResources flexStart */ + flexStart?: (google.cloud.aiplatform.v1beta1.IFlexStart|null); } /** Represents a DedicatedResources. */ @@ -146023,6 +146032,9 @@ export namespace google { /** DedicatedResources spot. */ public spot: boolean; + /** DedicatedResources flexStart. */ + public flexStart?: (google.cloud.aiplatform.v1beta1.IFlexStart|null); + /** * Creates a new DedicatedResources instance using the specified properties. * @param [properties] Properties to set @@ -146925,6 +146937,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FlexStart. */ + interface IFlexStart { + + /** FlexStart maxRuntimeDuration */ + maxRuntimeDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a FlexStart. */ + class FlexStart implements IFlexStart { + + /** + * Constructs a new FlexStart. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IFlexStart); + + /** FlexStart maxRuntimeDuration. */ + public maxRuntimeDuration?: (google.protobuf.IDuration|null); + + /** + * Creates a new FlexStart instance using the specified properties. + * @param [properties] Properties to set + * @returns FlexStart instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IFlexStart): google.cloud.aiplatform.v1beta1.FlexStart; + + /** + * Encodes the specified FlexStart message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FlexStart.verify|verify} messages. + * @param message FlexStart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IFlexStart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FlexStart message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FlexStart.verify|verify} messages. + * @param message FlexStart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IFlexStart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FlexStart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FlexStart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.FlexStart; + + /** + * Decodes a FlexStart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FlexStart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.FlexStart; + + /** + * Verifies a FlexStart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FlexStart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FlexStart + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.FlexStart; + + /** + * Creates a plain object from a FlexStart message. Also converts values to other types if specified. + * @param message FlexStart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.FlexStart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FlexStart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FlexStart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ReservationAffinity. */ interface IReservationAffinity { @@ -180153,6 +180262,9 @@ export namespace google { /** Properties of an EvaluateDatasetResponse. */ interface IEvaluateDatasetResponse { + /** EvaluateDatasetResponse aggregationOutput */ + aggregationOutput?: (google.cloud.aiplatform.v1beta1.IAggregationOutput|null); + /** EvaluateDatasetResponse outputInfo */ outputInfo?: (google.cloud.aiplatform.v1beta1.IOutputInfo|null); } @@ -180166,6 +180278,9 @@ export namespace google { */ constructor(properties?: google.cloud.aiplatform.v1beta1.IEvaluateDatasetResponse); + /** EvaluateDatasetResponse aggregationOutput. */ + public aggregationOutput?: (google.cloud.aiplatform.v1beta1.IAggregationOutput|null); + /** EvaluateDatasetResponse outputInfo. */ public outputInfo?: (google.cloud.aiplatform.v1beta1.IOutputInfo|null); @@ -180347,6 +180462,239 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AggregationOutput. */ + interface IAggregationOutput { + + /** AggregationOutput dataset */ + dataset?: (google.cloud.aiplatform.v1beta1.IEvaluationDataset|null); + + /** AggregationOutput aggregationResults */ + aggregationResults?: (google.cloud.aiplatform.v1beta1.IAggregationResult[]|null); + } + + /** Represents an AggregationOutput. */ + class AggregationOutput implements IAggregationOutput { + + /** + * Constructs a new AggregationOutput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IAggregationOutput); + + /** AggregationOutput dataset. */ + public dataset?: (google.cloud.aiplatform.v1beta1.IEvaluationDataset|null); + + /** AggregationOutput aggregationResults. */ + public aggregationResults: google.cloud.aiplatform.v1beta1.IAggregationResult[]; + + /** + * Creates a new AggregationOutput instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregationOutput instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IAggregationOutput): google.cloud.aiplatform.v1beta1.AggregationOutput; + + /** + * Encodes the specified AggregationOutput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationOutput.verify|verify} messages. + * @param message AggregationOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IAggregationOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AggregationOutput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationOutput.verify|verify} messages. + * @param message AggregationOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IAggregationOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AggregationOutput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregationOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.AggregationOutput; + + /** + * Decodes an AggregationOutput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregationOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.AggregationOutput; + + /** + * Verifies an AggregationOutput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AggregationOutput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregationOutput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.AggregationOutput; + + /** + * Creates a plain object from an AggregationOutput message. Also converts values to other types if specified. + * @param message AggregationOutput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.AggregationOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregationOutput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregationOutput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AggregationResult. */ + interface IAggregationResult { + + /** AggregationResult pointwiseMetricResult */ + pointwiseMetricResult?: (google.cloud.aiplatform.v1beta1.IPointwiseMetricResult|null); + + /** AggregationResult pairwiseMetricResult */ + pairwiseMetricResult?: (google.cloud.aiplatform.v1beta1.IPairwiseMetricResult|null); + + /** AggregationResult exactMatchMetricValue */ + exactMatchMetricValue?: (google.cloud.aiplatform.v1beta1.IExactMatchMetricValue|null); + + /** AggregationResult bleuMetricValue */ + bleuMetricValue?: (google.cloud.aiplatform.v1beta1.IBleuMetricValue|null); + + /** AggregationResult rougeMetricValue */ + rougeMetricValue?: (google.cloud.aiplatform.v1beta1.IRougeMetricValue|null); + + /** AggregationResult aggregationMetric */ + aggregationMetric?: (google.cloud.aiplatform.v1beta1.Metric.AggregationMetric|keyof typeof google.cloud.aiplatform.v1beta1.Metric.AggregationMetric|null); + } + + /** Represents an AggregationResult. */ + class AggregationResult implements IAggregationResult { + + /** + * Constructs a new AggregationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.IAggregationResult); + + /** AggregationResult pointwiseMetricResult. */ + public pointwiseMetricResult?: (google.cloud.aiplatform.v1beta1.IPointwiseMetricResult|null); + + /** AggregationResult pairwiseMetricResult. */ + public pairwiseMetricResult?: (google.cloud.aiplatform.v1beta1.IPairwiseMetricResult|null); + + /** AggregationResult exactMatchMetricValue. */ + public exactMatchMetricValue?: (google.cloud.aiplatform.v1beta1.IExactMatchMetricValue|null); + + /** AggregationResult bleuMetricValue. */ + public bleuMetricValue?: (google.cloud.aiplatform.v1beta1.IBleuMetricValue|null); + + /** AggregationResult rougeMetricValue. */ + public rougeMetricValue?: (google.cloud.aiplatform.v1beta1.IRougeMetricValue|null); + + /** AggregationResult aggregationMetric. */ + public aggregationMetric: (google.cloud.aiplatform.v1beta1.Metric.AggregationMetric|keyof typeof google.cloud.aiplatform.v1beta1.Metric.AggregationMetric); + + /** AggregationResult aggregationResult. */ + public aggregationResult?: ("pointwiseMetricResult"|"pairwiseMetricResult"|"exactMatchMetricValue"|"bleuMetricValue"|"rougeMetricValue"); + + /** + * Creates a new AggregationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregationResult instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.IAggregationResult): google.cloud.aiplatform.v1beta1.AggregationResult; + + /** + * Encodes the specified AggregationResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationResult.verify|verify} messages. + * @param message AggregationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.IAggregationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AggregationResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationResult.verify|verify} messages. + * @param message AggregationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.IAggregationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AggregationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.AggregationResult; + + /** + * Decodes an AggregationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.AggregationResult; + + /** + * Verifies an AggregationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AggregationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.AggregationResult; + + /** + * Creates a plain object from an AggregationResult message. Also converts values to other types if specified. + * @param message AggregationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.AggregationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an EvaluateDatasetRequest. */ interface IEvaluateDatasetRequest { @@ -225691,6 +226039,9 @@ export namespace google { /** TuningJob description */ description?: (string|null); + /** TuningJob customBaseModel */ + customBaseModel?: (string|null); + /** TuningJob state */ state?: (google.cloud.aiplatform.v1beta1.JobState|keyof typeof google.cloud.aiplatform.v1beta1.JobState|null); @@ -225729,6 +226080,9 @@ export namespace google { /** TuningJob serviceAccount */ serviceAccount?: (string|null); + + /** TuningJob outputUri */ + outputUri?: (string|null); } /** Represents a TuningJob. */ @@ -225761,6 +226115,9 @@ export namespace google { /** TuningJob description. */ public description: string; + /** TuningJob customBaseModel. */ + public customBaseModel: string; + /** TuningJob state. */ public state: (google.cloud.aiplatform.v1beta1.JobState|keyof typeof google.cloud.aiplatform.v1beta1.JobState); @@ -225800,6 +226157,9 @@ export namespace google { /** TuningJob serviceAccount. */ public serviceAccount: string; + /** TuningJob outputUri. */ + public outputUri: string; + /** TuningJob sourceModel. */ public sourceModel?: "baseModel"; @@ -227015,8 +227375,14 @@ export namespace google { /** SupervisedHyperParameters learningRateMultiplier */ learningRateMultiplier?: (number|null); + /** SupervisedHyperParameters learningRate */ + learningRate?: (number|null); + /** SupervisedHyperParameters adapterSize */ adapterSize?: (google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize|keyof typeof google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize|null); + + /** SupervisedHyperParameters batchSize */ + batchSize?: (number|Long|string|null); } /** Represents a SupervisedHyperParameters. */ @@ -227034,9 +227400,15 @@ export namespace google { /** SupervisedHyperParameters learningRateMultiplier. */ public learningRateMultiplier: number; + /** SupervisedHyperParameters learningRate. */ + public learningRate: number; + /** SupervisedHyperParameters adapterSize. */ public adapterSize: (google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize|keyof typeof google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize); + /** SupervisedHyperParameters batchSize. */ + public batchSize: (number|Long|string); + /** * Creates a new SupervisedHyperParameters instance using the specified properties. * @param [properties] Properties to set @@ -227143,6 +227515,9 @@ export namespace google { /** SupervisedTuningSpec exportLastCheckpointOnly */ exportLastCheckpointOnly?: (boolean|null); + + /** SupervisedTuningSpec tuningMode */ + tuningMode?: (google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode|keyof typeof google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode|null); } /** Represents a SupervisedTuningSpec. */ @@ -227166,6 +227541,9 @@ export namespace google { /** SupervisedTuningSpec exportLastCheckpointOnly. */ public exportLastCheckpointOnly: boolean; + /** SupervisedTuningSpec tuningMode. */ + public tuningMode: (google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode|keyof typeof google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode); + /** * Creates a new SupervisedTuningSpec instance using the specified properties. * @param [properties] Properties to set @@ -227244,6 +227622,16 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace SupervisedTuningSpec { + + /** TuningMode enum. */ + enum TuningMode { + TUNING_MODE_UNSPECIFIED = 0, + TUNING_MODE_FULL = 1, + TUNING_MODE_PEFT_ADAPTER = 2 + } + } + /** Properties of a DistillationSpec. */ interface IDistillationSpec { @@ -257341,6 +257729,9 @@ export namespace google { /** DeployRequest huggingFaceModelId */ huggingFaceModelId?: (string|null); + /** DeployRequest customModel */ + customModel?: (google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel|null); + /** DeployRequest destination */ destination?: (string|null); @@ -257369,6 +257760,9 @@ export namespace google { /** DeployRequest huggingFaceModelId. */ public huggingFaceModelId?: (string|null); + /** DeployRequest customModel. */ + public customModel?: (google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel|null); + /** DeployRequest destination. */ public destination: string; @@ -257382,7 +257776,7 @@ export namespace google { public deployConfig?: (google.cloud.aiplatform.v1beta1.DeployRequest.IDeployConfig|null); /** DeployRequest artifacts. */ - public artifacts?: ("publisherModelName"|"huggingFaceModelId"); + public artifacts?: ("publisherModelName"|"huggingFaceModelId"|"customModel"); /** * Creates a new DeployRequest instance using the specified properties. @@ -257464,6 +257858,106 @@ export namespace google { namespace DeployRequest { + /** Properties of a CustomModel. */ + interface ICustomModel { + + /** CustomModel gcsUri */ + gcsUri?: (string|null); + } + + /** Represents a CustomModel. */ + class CustomModel implements ICustomModel { + + /** + * Constructs a new CustomModel. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel); + + /** CustomModel gcsUri. */ + public gcsUri?: (string|null); + + /** CustomModel modelSource. */ + public modelSource?: "gcsUri"; + + /** + * Creates a new CustomModel instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomModel instance + */ + public static create(properties?: google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel): google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel; + + /** + * Encodes the specified CustomModel message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.verify|verify} messages. + * @param message CustomModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.verify|verify} messages. + * @param message CustomModel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomModel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel; + + /** + * Decodes a CustomModel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel; + + /** + * Verifies a CustomModel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomModel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomModel + */ + public static fromObject(object: { [k: string]: any }): google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel; + + /** + * Creates a plain object from a CustomModel message. Also converts values to other types if specified. + * @param message CustomModel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomModel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomModel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ModelConfig. */ interface IModelConfig { @@ -318920,6 +319414,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -318937,6 +319434,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -319637,6 +320137,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -319651,6 +320154,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -319729,6 +320235,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -320055,6 +320673,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -320069,6 +320690,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -320393,6 +321017,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -320618,6 +321345,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -320648,6 +321376,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -320697,6 +321428,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -320831,6 +321565,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -320872,6 +321609,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -321719,6 +322459,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -321745,6 +322488,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -322679,6 +323425,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -322734,6 +323483,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -322954,6 +323706,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -323192,6 +324059,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -323214,6 +324084,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -323806,6 +324679,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -323835,6 +324714,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -323957,6 +324842,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -324076,8 +325071,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -324092,8 +325090,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -324626,6 +325627,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Struct. */ interface IStruct { diff --git a/packages/google-cloud-aiplatform/protos/protos.js b/packages/google-cloud-aiplatform/protos/protos.js index bd5dc3ef6403..eede7ab007b4 100644 --- a/packages/google-cloud-aiplatform/protos/protos.js +++ b/packages/google-cloud-aiplatform/protos/protos.js @@ -274175,6 +274175,7 @@ * @property {Array.|null} [pipelineTaskStatus] PipelineTaskDetail pipelineTaskStatus * @property {Object.|null} [inputs] PipelineTaskDetail inputs * @property {Object.|null} [outputs] PipelineTaskDetail outputs + * @property {string|null} [taskUniqueName] PipelineTaskDetail taskUniqueName */ /** @@ -274299,6 +274300,14 @@ */ PipelineTaskDetail.prototype.outputs = $util.emptyObject; + /** + * PipelineTaskDetail taskUniqueName. + * @member {string} taskUniqueName + * @memberof google.cloud.aiplatform.v1.PipelineTaskDetail + * @instance + */ + PipelineTaskDetail.prototype.taskUniqueName = ""; + /** * Creates a new PipelineTaskDetail instance using the specified properties. * @function create @@ -274356,6 +274365,8 @@ if (message.pipelineTaskStatus != null && message.pipelineTaskStatus.length) for (var i = 0; i < message.pipelineTaskStatus.length; ++i) $root.google.cloud.aiplatform.v1.PipelineTaskDetail.PipelineTaskStatus.encode(message.pipelineTaskStatus[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.taskUniqueName != null && Object.hasOwnProperty.call(message, "taskUniqueName")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.taskUniqueName); return writer; }; @@ -274484,6 +274495,10 @@ message.outputs[key] = value; break; } + case 14: { + message.taskUniqueName = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -274603,6 +274618,9 @@ return "outputs." + error; } } + if (message.taskUniqueName != null && message.hasOwnProperty("taskUniqueName")) + if (!$util.isString(message.taskUniqueName)) + return "taskUniqueName: string expected"; return null; }; @@ -274746,6 +274764,8 @@ message.outputs[keys[i]] = $root.google.cloud.aiplatform.v1.PipelineTaskDetail.ArtifactList.fromObject(object.outputs[keys[i]]); } } + if (object.taskUniqueName != null) + message.taskUniqueName = String(object.taskUniqueName); return message; }; @@ -274787,6 +274807,7 @@ object.parentTaskId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.parentTaskId = options.longs === String ? "0" : 0; + object.taskUniqueName = ""; } if (message.taskId != null && message.hasOwnProperty("taskId")) if (typeof message.taskId === "number") @@ -274830,6 +274851,8 @@ for (var j = 0; j < message.pipelineTaskStatus.length; ++j) object.pipelineTaskStatus[j] = $root.google.cloud.aiplatform.v1.PipelineTaskDetail.PipelineTaskStatus.toObject(message.pipelineTaskStatus[j], options); } + if (message.taskUniqueName != null && message.hasOwnProperty("taskUniqueName")) + object.taskUniqueName = message.taskUniqueName; return object; }; @@ -358077,6 +358100,7 @@ * @property {number|null} [requiredReplicaCount] DedicatedResources requiredReplicaCount * @property {Array.|null} [autoscalingMetricSpecs] DedicatedResources autoscalingMetricSpecs * @property {boolean|null} [spot] DedicatedResources spot + * @property {google.cloud.aiplatform.v1beta1.IFlexStart|null} [flexStart] DedicatedResources flexStart */ /** @@ -358143,6 +358167,14 @@ */ DedicatedResources.prototype.spot = false; + /** + * DedicatedResources flexStart. + * @member {google.cloud.aiplatform.v1beta1.IFlexStart|null|undefined} flexStart + * @memberof google.cloud.aiplatform.v1beta1.DedicatedResources + * @instance + */ + DedicatedResources.prototype.flexStart = null; + /** * Creates a new DedicatedResources instance using the specified properties. * @function create @@ -358180,6 +358212,8 @@ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.spot); if (message.requiredReplicaCount != null && Object.hasOwnProperty.call(message, "requiredReplicaCount")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.requiredReplicaCount); + if (message.flexStart != null && Object.hasOwnProperty.call(message, "flexStart")) + $root.google.cloud.aiplatform.v1beta1.FlexStart.encode(message.flexStart, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; @@ -358242,6 +358276,10 @@ message.spot = reader.bool(); break; } + case 10: { + message.flexStart = $root.google.cloud.aiplatform.v1beta1.FlexStart.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -358303,6 +358341,11 @@ if (message.spot != null && message.hasOwnProperty("spot")) if (typeof message.spot !== "boolean") return "spot: boolean expected"; + if (message.flexStart != null && message.hasOwnProperty("flexStart")) { + var error = $root.google.cloud.aiplatform.v1beta1.FlexStart.verify(message.flexStart); + if (error) + return "flexStart." + error; + } return null; }; @@ -358341,6 +358384,11 @@ } if (object.spot != null) message.spot = Boolean(object.spot); + if (object.flexStart != null) { + if (typeof object.flexStart !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.DedicatedResources.flexStart: object expected"); + message.flexStart = $root.google.cloud.aiplatform.v1beta1.FlexStart.fromObject(object.flexStart); + } return message; }; @@ -358365,6 +358413,7 @@ object.maxReplicaCount = 0; object.spot = false; object.requiredReplicaCount = 0; + object.flexStart = null; } if (message.machineSpec != null && message.hasOwnProperty("machineSpec")) object.machineSpec = $root.google.cloud.aiplatform.v1beta1.MachineSpec.toObject(message.machineSpec, options); @@ -358381,6 +358430,8 @@ object.spot = message.spot; if (message.requiredReplicaCount != null && message.hasOwnProperty("requiredReplicaCount")) object.requiredReplicaCount = message.requiredReplicaCount; + if (message.flexStart != null && message.hasOwnProperty("flexStart")) + object.flexStart = $root.google.cloud.aiplatform.v1beta1.FlexStart.toObject(message.flexStart, options); return object; }; @@ -360262,6 +360313,216 @@ return ShieldedVmConfig; })(); + v1beta1.FlexStart = (function() { + + /** + * Properties of a FlexStart. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IFlexStart + * @property {google.protobuf.IDuration|null} [maxRuntimeDuration] FlexStart maxRuntimeDuration + */ + + /** + * Constructs a new FlexStart. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents a FlexStart. + * @implements IFlexStart + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IFlexStart=} [properties] Properties to set + */ + function FlexStart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FlexStart maxRuntimeDuration. + * @member {google.protobuf.IDuration|null|undefined} maxRuntimeDuration + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @instance + */ + FlexStart.prototype.maxRuntimeDuration = null; + + /** + * Creates a new FlexStart instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {google.cloud.aiplatform.v1beta1.IFlexStart=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.FlexStart} FlexStart instance + */ + FlexStart.create = function create(properties) { + return new FlexStart(properties); + }; + + /** + * Encodes the specified FlexStart message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FlexStart.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {google.cloud.aiplatform.v1beta1.IFlexStart} message FlexStart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlexStart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxRuntimeDuration != null && Object.hasOwnProperty.call(message, "maxRuntimeDuration")) + $root.google.protobuf.Duration.encode(message.maxRuntimeDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FlexStart message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.FlexStart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {google.cloud.aiplatform.v1beta1.IFlexStart} message FlexStart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FlexStart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FlexStart message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.FlexStart} FlexStart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlexStart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.FlexStart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.maxRuntimeDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FlexStart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.FlexStart} FlexStart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FlexStart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FlexStart message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FlexStart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxRuntimeDuration != null && message.hasOwnProperty("maxRuntimeDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxRuntimeDuration); + if (error) + return "maxRuntimeDuration." + error; + } + return null; + }; + + /** + * Creates a FlexStart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.FlexStart} FlexStart + */ + FlexStart.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.FlexStart) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.FlexStart(); + if (object.maxRuntimeDuration != null) { + if (typeof object.maxRuntimeDuration !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.FlexStart.maxRuntimeDuration: object expected"); + message.maxRuntimeDuration = $root.google.protobuf.Duration.fromObject(object.maxRuntimeDuration); + } + return message; + }; + + /** + * Creates a plain object from a FlexStart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {google.cloud.aiplatform.v1beta1.FlexStart} message FlexStart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FlexStart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.maxRuntimeDuration = null; + if (message.maxRuntimeDuration != null && message.hasOwnProperty("maxRuntimeDuration")) + object.maxRuntimeDuration = $root.google.protobuf.Duration.toObject(message.maxRuntimeDuration, options); + return object; + }; + + /** + * Converts this FlexStart to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @instance + * @returns {Object.} JSON object + */ + FlexStart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FlexStart + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.FlexStart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FlexStart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.FlexStart"; + }; + + return FlexStart; + })(); + v1beta1.ReservationAffinity = (function() { /** @@ -444849,6 +445110,7 @@ * Properties of an EvaluateDatasetResponse. * @memberof google.cloud.aiplatform.v1beta1 * @interface IEvaluateDatasetResponse + * @property {google.cloud.aiplatform.v1beta1.IAggregationOutput|null} [aggregationOutput] EvaluateDatasetResponse aggregationOutput * @property {google.cloud.aiplatform.v1beta1.IOutputInfo|null} [outputInfo] EvaluateDatasetResponse outputInfo */ @@ -444867,6 +445129,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * EvaluateDatasetResponse aggregationOutput. + * @member {google.cloud.aiplatform.v1beta1.IAggregationOutput|null|undefined} aggregationOutput + * @memberof google.cloud.aiplatform.v1beta1.EvaluateDatasetResponse + * @instance + */ + EvaluateDatasetResponse.prototype.aggregationOutput = null; + /** * EvaluateDatasetResponse outputInfo. * @member {google.cloud.aiplatform.v1beta1.IOutputInfo|null|undefined} outputInfo @@ -444899,6 +445169,8 @@ EvaluateDatasetResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.aggregationOutput != null && Object.hasOwnProperty.call(message, "aggregationOutput")) + $root.google.cloud.aiplatform.v1beta1.AggregationOutput.encode(message.aggregationOutput, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.outputInfo != null && Object.hasOwnProperty.call(message, "outputInfo")) $root.google.cloud.aiplatform.v1beta1.OutputInfo.encode(message.outputInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; @@ -444937,6 +445209,10 @@ if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.aggregationOutput = $root.google.cloud.aiplatform.v1beta1.AggregationOutput.decode(reader, reader.uint32()); + break; + } case 3: { message.outputInfo = $root.google.cloud.aiplatform.v1beta1.OutputInfo.decode(reader, reader.uint32()); break; @@ -444976,6 +445252,11 @@ EvaluateDatasetResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.aggregationOutput != null && message.hasOwnProperty("aggregationOutput")) { + var error = $root.google.cloud.aiplatform.v1beta1.AggregationOutput.verify(message.aggregationOutput); + if (error) + return "aggregationOutput." + error; + } if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) { var error = $root.google.cloud.aiplatform.v1beta1.OutputInfo.verify(message.outputInfo); if (error) @@ -444996,6 +445277,11 @@ if (object instanceof $root.google.cloud.aiplatform.v1beta1.EvaluateDatasetResponse) return object; var message = new $root.google.cloud.aiplatform.v1beta1.EvaluateDatasetResponse(); + if (object.aggregationOutput != null) { + if (typeof object.aggregationOutput !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateDatasetResponse.aggregationOutput: object expected"); + message.aggregationOutput = $root.google.cloud.aiplatform.v1beta1.AggregationOutput.fromObject(object.aggregationOutput); + } if (object.outputInfo != null) { if (typeof object.outputInfo !== "object") throw TypeError(".google.cloud.aiplatform.v1beta1.EvaluateDatasetResponse.outputInfo: object expected"); @@ -445017,8 +445303,12 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { + object.aggregationOutput = null; object.outputInfo = null; + } + if (message.aggregationOutput != null && message.hasOwnProperty("aggregationOutput")) + object.aggregationOutput = $root.google.cloud.aiplatform.v1beta1.AggregationOutput.toObject(message.aggregationOutput, options); if (message.outputInfo != null && message.hasOwnProperty("outputInfo")) object.outputInfo = $root.google.cloud.aiplatform.v1beta1.OutputInfo.toObject(message.outputInfo, options); return object; @@ -445276,6 +445566,718 @@ return OutputInfo; })(); + v1beta1.AggregationOutput = (function() { + + /** + * Properties of an AggregationOutput. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IAggregationOutput + * @property {google.cloud.aiplatform.v1beta1.IEvaluationDataset|null} [dataset] AggregationOutput dataset + * @property {Array.|null} [aggregationResults] AggregationOutput aggregationResults + */ + + /** + * Constructs a new AggregationOutput. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an AggregationOutput. + * @implements IAggregationOutput + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IAggregationOutput=} [properties] Properties to set + */ + function AggregationOutput(properties) { + this.aggregationResults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AggregationOutput dataset. + * @member {google.cloud.aiplatform.v1beta1.IEvaluationDataset|null|undefined} dataset + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @instance + */ + AggregationOutput.prototype.dataset = null; + + /** + * AggregationOutput aggregationResults. + * @member {Array.} aggregationResults + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @instance + */ + AggregationOutput.prototype.aggregationResults = $util.emptyArray; + + /** + * Creates a new AggregationOutput instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {google.cloud.aiplatform.v1beta1.IAggregationOutput=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.AggregationOutput} AggregationOutput instance + */ + AggregationOutput.create = function create(properties) { + return new AggregationOutput(properties); + }; + + /** + * Encodes the specified AggregationOutput message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationOutput.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {google.cloud.aiplatform.v1beta1.IAggregationOutput} message AggregationOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregationOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataset != null && Object.hasOwnProperty.call(message, "dataset")) + $root.google.cloud.aiplatform.v1beta1.EvaluationDataset.encode(message.dataset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.aggregationResults != null && message.aggregationResults.length) + for (var i = 0; i < message.aggregationResults.length; ++i) + $root.google.cloud.aiplatform.v1beta1.AggregationResult.encode(message.aggregationResults[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AggregationOutput message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {google.cloud.aiplatform.v1beta1.IAggregationOutput} message AggregationOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregationOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregationOutput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.AggregationOutput} AggregationOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregationOutput.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.AggregationOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataset = $root.google.cloud.aiplatform.v1beta1.EvaluationDataset.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.aggregationResults && message.aggregationResults.length)) + message.aggregationResults = []; + message.aggregationResults.push($root.google.cloud.aiplatform.v1beta1.AggregationResult.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AggregationOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.AggregationOutput} AggregationOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregationOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AggregationOutput message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregationOutput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataset != null && message.hasOwnProperty("dataset")) { + var error = $root.google.cloud.aiplatform.v1beta1.EvaluationDataset.verify(message.dataset); + if (error) + return "dataset." + error; + } + if (message.aggregationResults != null && message.hasOwnProperty("aggregationResults")) { + if (!Array.isArray(message.aggregationResults)) + return "aggregationResults: array expected"; + for (var i = 0; i < message.aggregationResults.length; ++i) { + var error = $root.google.cloud.aiplatform.v1beta1.AggregationResult.verify(message.aggregationResults[i]); + if (error) + return "aggregationResults." + error; + } + } + return null; + }; + + /** + * Creates an AggregationOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.AggregationOutput} AggregationOutput + */ + AggregationOutput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.AggregationOutput) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.AggregationOutput(); + if (object.dataset != null) { + if (typeof object.dataset !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationOutput.dataset: object expected"); + message.dataset = $root.google.cloud.aiplatform.v1beta1.EvaluationDataset.fromObject(object.dataset); + } + if (object.aggregationResults) { + if (!Array.isArray(object.aggregationResults)) + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationOutput.aggregationResults: array expected"); + message.aggregationResults = []; + for (var i = 0; i < object.aggregationResults.length; ++i) { + if (typeof object.aggregationResults[i] !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationOutput.aggregationResults: object expected"); + message.aggregationResults[i] = $root.google.cloud.aiplatform.v1beta1.AggregationResult.fromObject(object.aggregationResults[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AggregationOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {google.cloud.aiplatform.v1beta1.AggregationOutput} message AggregationOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregationOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aggregationResults = []; + if (options.defaults) + object.dataset = null; + if (message.dataset != null && message.hasOwnProperty("dataset")) + object.dataset = $root.google.cloud.aiplatform.v1beta1.EvaluationDataset.toObject(message.dataset, options); + if (message.aggregationResults && message.aggregationResults.length) { + object.aggregationResults = []; + for (var j = 0; j < message.aggregationResults.length; ++j) + object.aggregationResults[j] = $root.google.cloud.aiplatform.v1beta1.AggregationResult.toObject(message.aggregationResults[j], options); + } + return object; + }; + + /** + * Converts this AggregationOutput to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @instance + * @returns {Object.} JSON object + */ + AggregationOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregationOutput + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.AggregationOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregationOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.AggregationOutput"; + }; + + return AggregationOutput; + })(); + + v1beta1.AggregationResult = (function() { + + /** + * Properties of an AggregationResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @interface IAggregationResult + * @property {google.cloud.aiplatform.v1beta1.IPointwiseMetricResult|null} [pointwiseMetricResult] AggregationResult pointwiseMetricResult + * @property {google.cloud.aiplatform.v1beta1.IPairwiseMetricResult|null} [pairwiseMetricResult] AggregationResult pairwiseMetricResult + * @property {google.cloud.aiplatform.v1beta1.IExactMatchMetricValue|null} [exactMatchMetricValue] AggregationResult exactMatchMetricValue + * @property {google.cloud.aiplatform.v1beta1.IBleuMetricValue|null} [bleuMetricValue] AggregationResult bleuMetricValue + * @property {google.cloud.aiplatform.v1beta1.IRougeMetricValue|null} [rougeMetricValue] AggregationResult rougeMetricValue + * @property {google.cloud.aiplatform.v1beta1.Metric.AggregationMetric|null} [aggregationMetric] AggregationResult aggregationMetric + */ + + /** + * Constructs a new AggregationResult. + * @memberof google.cloud.aiplatform.v1beta1 + * @classdesc Represents an AggregationResult. + * @implements IAggregationResult + * @constructor + * @param {google.cloud.aiplatform.v1beta1.IAggregationResult=} [properties] Properties to set + */ + function AggregationResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AggregationResult pointwiseMetricResult. + * @member {google.cloud.aiplatform.v1beta1.IPointwiseMetricResult|null|undefined} pointwiseMetricResult + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + */ + AggregationResult.prototype.pointwiseMetricResult = null; + + /** + * AggregationResult pairwiseMetricResult. + * @member {google.cloud.aiplatform.v1beta1.IPairwiseMetricResult|null|undefined} pairwiseMetricResult + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + */ + AggregationResult.prototype.pairwiseMetricResult = null; + + /** + * AggregationResult exactMatchMetricValue. + * @member {google.cloud.aiplatform.v1beta1.IExactMatchMetricValue|null|undefined} exactMatchMetricValue + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + */ + AggregationResult.prototype.exactMatchMetricValue = null; + + /** + * AggregationResult bleuMetricValue. + * @member {google.cloud.aiplatform.v1beta1.IBleuMetricValue|null|undefined} bleuMetricValue + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + */ + AggregationResult.prototype.bleuMetricValue = null; + + /** + * AggregationResult rougeMetricValue. + * @member {google.cloud.aiplatform.v1beta1.IRougeMetricValue|null|undefined} rougeMetricValue + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + */ + AggregationResult.prototype.rougeMetricValue = null; + + /** + * AggregationResult aggregationMetric. + * @member {google.cloud.aiplatform.v1beta1.Metric.AggregationMetric} aggregationMetric + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + */ + AggregationResult.prototype.aggregationMetric = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AggregationResult aggregationResult. + * @member {"pointwiseMetricResult"|"pairwiseMetricResult"|"exactMatchMetricValue"|"bleuMetricValue"|"rougeMetricValue"|undefined} aggregationResult + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + */ + Object.defineProperty(AggregationResult.prototype, "aggregationResult", { + get: $util.oneOfGetter($oneOfFields = ["pointwiseMetricResult", "pairwiseMetricResult", "exactMatchMetricValue", "bleuMetricValue", "rougeMetricValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AggregationResult instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IAggregationResult=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.AggregationResult} AggregationResult instance + */ + AggregationResult.create = function create(properties) { + return new AggregationResult(properties); + }; + + /** + * Encodes the specified AggregationResult message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IAggregationResult} message AggregationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.aggregationMetric != null && Object.hasOwnProperty.call(message, "aggregationMetric")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.aggregationMetric); + if (message.pointwiseMetricResult != null && Object.hasOwnProperty.call(message, "pointwiseMetricResult")) + $root.google.cloud.aiplatform.v1beta1.PointwiseMetricResult.encode(message.pointwiseMetricResult, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pairwiseMetricResult != null && Object.hasOwnProperty.call(message, "pairwiseMetricResult")) + $root.google.cloud.aiplatform.v1beta1.PairwiseMetricResult.encode(message.pairwiseMetricResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.exactMatchMetricValue != null && Object.hasOwnProperty.call(message, "exactMatchMetricValue")) + $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.encode(message.exactMatchMetricValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.bleuMetricValue != null && Object.hasOwnProperty.call(message, "bleuMetricValue")) + $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.encode(message.bleuMetricValue, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.rougeMetricValue != null && Object.hasOwnProperty.call(message, "rougeMetricValue")) + $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.encode(message.rougeMetricValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AggregationResult message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.AggregationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {google.cloud.aiplatform.v1beta1.IAggregationResult} message AggregationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.AggregationResult} AggregationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregationResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.AggregationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + message.pointwiseMetricResult = $root.google.cloud.aiplatform.v1beta1.PointwiseMetricResult.decode(reader, reader.uint32()); + break; + } + case 6: { + message.pairwiseMetricResult = $root.google.cloud.aiplatform.v1beta1.PairwiseMetricResult.decode(reader, reader.uint32()); + break; + } + case 7: { + message.exactMatchMetricValue = $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.decode(reader, reader.uint32()); + break; + } + case 8: { + message.bleuMetricValue = $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.decode(reader, reader.uint32()); + break; + } + case 9: { + message.rougeMetricValue = $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.decode(reader, reader.uint32()); + break; + } + case 4: { + message.aggregationMetric = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AggregationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.AggregationResult} AggregationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AggregationResult message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.pointwiseMetricResult != null && message.hasOwnProperty("pointwiseMetricResult")) { + properties.aggregationResult = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.PointwiseMetricResult.verify(message.pointwiseMetricResult); + if (error) + return "pointwiseMetricResult." + error; + } + } + if (message.pairwiseMetricResult != null && message.hasOwnProperty("pairwiseMetricResult")) { + if (properties.aggregationResult === 1) + return "aggregationResult: multiple values"; + properties.aggregationResult = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.PairwiseMetricResult.verify(message.pairwiseMetricResult); + if (error) + return "pairwiseMetricResult." + error; + } + } + if (message.exactMatchMetricValue != null && message.hasOwnProperty("exactMatchMetricValue")) { + if (properties.aggregationResult === 1) + return "aggregationResult: multiple values"; + properties.aggregationResult = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.verify(message.exactMatchMetricValue); + if (error) + return "exactMatchMetricValue." + error; + } + } + if (message.bleuMetricValue != null && message.hasOwnProperty("bleuMetricValue")) { + if (properties.aggregationResult === 1) + return "aggregationResult: multiple values"; + properties.aggregationResult = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.verify(message.bleuMetricValue); + if (error) + return "bleuMetricValue." + error; + } + } + if (message.rougeMetricValue != null && message.hasOwnProperty("rougeMetricValue")) { + if (properties.aggregationResult === 1) + return "aggregationResult: multiple values"; + properties.aggregationResult = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.verify(message.rougeMetricValue); + if (error) + return "rougeMetricValue." + error; + } + } + if (message.aggregationMetric != null && message.hasOwnProperty("aggregationMetric")) + switch (message.aggregationMetric) { + default: + return "aggregationMetric: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + return null; + }; + + /** + * Creates an AggregationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.AggregationResult} AggregationResult + */ + AggregationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.AggregationResult) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.AggregationResult(); + if (object.pointwiseMetricResult != null) { + if (typeof object.pointwiseMetricResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationResult.pointwiseMetricResult: object expected"); + message.pointwiseMetricResult = $root.google.cloud.aiplatform.v1beta1.PointwiseMetricResult.fromObject(object.pointwiseMetricResult); + } + if (object.pairwiseMetricResult != null) { + if (typeof object.pairwiseMetricResult !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationResult.pairwiseMetricResult: object expected"); + message.pairwiseMetricResult = $root.google.cloud.aiplatform.v1beta1.PairwiseMetricResult.fromObject(object.pairwiseMetricResult); + } + if (object.exactMatchMetricValue != null) { + if (typeof object.exactMatchMetricValue !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationResult.exactMatchMetricValue: object expected"); + message.exactMatchMetricValue = $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.fromObject(object.exactMatchMetricValue); + } + if (object.bleuMetricValue != null) { + if (typeof object.bleuMetricValue !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationResult.bleuMetricValue: object expected"); + message.bleuMetricValue = $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.fromObject(object.bleuMetricValue); + } + if (object.rougeMetricValue != null) { + if (typeof object.rougeMetricValue !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.AggregationResult.rougeMetricValue: object expected"); + message.rougeMetricValue = $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.fromObject(object.rougeMetricValue); + } + switch (object.aggregationMetric) { + default: + if (typeof object.aggregationMetric === "number") { + message.aggregationMetric = object.aggregationMetric; + break; + } + break; + case "AGGREGATION_METRIC_UNSPECIFIED": + case 0: + message.aggregationMetric = 0; + break; + case "AVERAGE": + case 1: + message.aggregationMetric = 1; + break; + case "MODE": + case 2: + message.aggregationMetric = 2; + break; + case "STANDARD_DEVIATION": + case 3: + message.aggregationMetric = 3; + break; + case "VARIANCE": + case 4: + message.aggregationMetric = 4; + break; + case "MINIMUM": + case 5: + message.aggregationMetric = 5; + break; + case "MAXIMUM": + case 6: + message.aggregationMetric = 6; + break; + case "MEDIAN": + case 7: + message.aggregationMetric = 7; + break; + case "PERCENTILE_P90": + case 8: + message.aggregationMetric = 8; + break; + case "PERCENTILE_P95": + case 9: + message.aggregationMetric = 9; + break; + case "PERCENTILE_P99": + case 10: + message.aggregationMetric = 10; + break; + } + return message; + }; + + /** + * Creates a plain object from an AggregationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {google.cloud.aiplatform.v1beta1.AggregationResult} message AggregationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.aggregationMetric = options.enums === String ? "AGGREGATION_METRIC_UNSPECIFIED" : 0; + if (message.aggregationMetric != null && message.hasOwnProperty("aggregationMetric")) + object.aggregationMetric = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.Metric.AggregationMetric[message.aggregationMetric] === undefined ? message.aggregationMetric : $root.google.cloud.aiplatform.v1beta1.Metric.AggregationMetric[message.aggregationMetric] : message.aggregationMetric; + if (message.pointwiseMetricResult != null && message.hasOwnProperty("pointwiseMetricResult")) { + object.pointwiseMetricResult = $root.google.cloud.aiplatform.v1beta1.PointwiseMetricResult.toObject(message.pointwiseMetricResult, options); + if (options.oneofs) + object.aggregationResult = "pointwiseMetricResult"; + } + if (message.pairwiseMetricResult != null && message.hasOwnProperty("pairwiseMetricResult")) { + object.pairwiseMetricResult = $root.google.cloud.aiplatform.v1beta1.PairwiseMetricResult.toObject(message.pairwiseMetricResult, options); + if (options.oneofs) + object.aggregationResult = "pairwiseMetricResult"; + } + if (message.exactMatchMetricValue != null && message.hasOwnProperty("exactMatchMetricValue")) { + object.exactMatchMetricValue = $root.google.cloud.aiplatform.v1beta1.ExactMatchMetricValue.toObject(message.exactMatchMetricValue, options); + if (options.oneofs) + object.aggregationResult = "exactMatchMetricValue"; + } + if (message.bleuMetricValue != null && message.hasOwnProperty("bleuMetricValue")) { + object.bleuMetricValue = $root.google.cloud.aiplatform.v1beta1.BleuMetricValue.toObject(message.bleuMetricValue, options); + if (options.oneofs) + object.aggregationResult = "bleuMetricValue"; + } + if (message.rougeMetricValue != null && message.hasOwnProperty("rougeMetricValue")) { + object.rougeMetricValue = $root.google.cloud.aiplatform.v1beta1.RougeMetricValue.toObject(message.rougeMetricValue, options); + if (options.oneofs) + object.aggregationResult = "rougeMetricValue"; + } + return object; + }; + + /** + * Converts this AggregationResult to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @instance + * @returns {Object.} JSON object + */ + AggregationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregationResult + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.AggregationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.AggregationResult"; + }; + + return AggregationResult; + })(); + v1beta1.EvaluateDatasetRequest = (function() { /** @@ -555003,6 +556005,7 @@ * @property {string|null} [name] TuningJob name * @property {string|null} [tunedModelDisplayName] TuningJob tunedModelDisplayName * @property {string|null} [description] TuningJob description + * @property {string|null} [customBaseModel] TuningJob customBaseModel * @property {google.cloud.aiplatform.v1beta1.JobState|null} [state] TuningJob state * @property {google.protobuf.ITimestamp|null} [createTime] TuningJob createTime * @property {google.protobuf.ITimestamp|null} [startTime] TuningJob startTime @@ -555016,6 +556019,7 @@ * @property {string|null} [pipelineJob] TuningJob pipelineJob * @property {google.cloud.aiplatform.v1beta1.IEncryptionSpec|null} [encryptionSpec] TuningJob encryptionSpec * @property {string|null} [serviceAccount] TuningJob serviceAccount + * @property {string|null} [outputUri] TuningJob outputUri */ /** @@ -555090,6 +556094,14 @@ */ TuningJob.prototype.description = ""; + /** + * TuningJob customBaseModel. + * @member {string} customBaseModel + * @memberof google.cloud.aiplatform.v1beta1.TuningJob + * @instance + */ + TuningJob.prototype.customBaseModel = ""; + /** * TuningJob state. * @member {google.cloud.aiplatform.v1beta1.JobState} state @@ -555194,6 +556206,14 @@ */ TuningJob.prototype.serviceAccount = ""; + /** + * TuningJob outputUri. + * @member {string} outputUri + * @memberof google.cloud.aiplatform.v1beta1.TuningJob + * @instance + */ + TuningJob.prototype.outputUri = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -555284,6 +556304,10 @@ $root.google.cloud.aiplatform.v1beta1.PartnerModelTuningSpec.encode(message.partnerModelTuningSpec, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) writer.uint32(/* id 22, wireType 2 =*/178).string(message.serviceAccount); + if (message.outputUri != null && Object.hasOwnProperty.call(message, "outputUri")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.outputUri); + if (message.customBaseModel != null && Object.hasOwnProperty.call(message, "customBaseModel")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.customBaseModel); return writer; }; @@ -555348,6 +556372,10 @@ message.description = reader.string(); break; } + case 26: { + message.customBaseModel = reader.string(); + break; + } case 6: { message.state = reader.int32(); break; @@ -555419,6 +556447,10 @@ message.serviceAccount = reader.string(); break; } + case 25: { + message.outputUri = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -555497,6 +556529,9 @@ if (message.description != null && message.hasOwnProperty("description")) if (!$util.isString(message.description)) return "description: string expected"; + if (message.customBaseModel != null && message.hasOwnProperty("customBaseModel")) + if (!$util.isString(message.customBaseModel)) + return "customBaseModel: string expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -555572,6 +556607,9 @@ if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) if (!$util.isString(message.serviceAccount)) return "serviceAccount: string expected"; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + if (!$util.isString(message.outputUri)) + return "outputUri: string expected"; return null; }; @@ -555610,6 +556648,8 @@ message.tunedModelDisplayName = String(object.tunedModelDisplayName); if (object.description != null) message.description = String(object.description); + if (object.customBaseModel != null) + message.customBaseModel = String(object.customBaseModel); switch (object.state) { default: if (typeof object.state === "number") { @@ -555719,6 +556759,8 @@ } if (object.serviceAccount != null) message.serviceAccount = String(object.serviceAccount); + if (object.outputUri != null) + message.outputUri = String(object.outputUri); return message; }; @@ -555753,6 +556795,8 @@ object.encryptionSpec = null; object.pipelineJob = ""; object.serviceAccount = ""; + object.outputUri = ""; + object.customBaseModel = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -555810,6 +556854,10 @@ } if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) object.serviceAccount = message.serviceAccount; + if (message.outputUri != null && message.hasOwnProperty("outputUri")) + object.outputUri = message.outputUri; + if (message.customBaseModel != null && message.hasOwnProperty("customBaseModel")) + object.customBaseModel = message.customBaseModel; return object; }; @@ -559051,7 +560099,9 @@ * @interface ISupervisedHyperParameters * @property {number|Long|null} [epochCount] SupervisedHyperParameters epochCount * @property {number|null} [learningRateMultiplier] SupervisedHyperParameters learningRateMultiplier + * @property {number|null} [learningRate] SupervisedHyperParameters learningRate * @property {google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize|null} [adapterSize] SupervisedHyperParameters adapterSize + * @property {number|Long|null} [batchSize] SupervisedHyperParameters batchSize */ /** @@ -559085,6 +560135,14 @@ */ SupervisedHyperParameters.prototype.learningRateMultiplier = 0; + /** + * SupervisedHyperParameters learningRate. + * @member {number} learningRate + * @memberof google.cloud.aiplatform.v1beta1.SupervisedHyperParameters + * @instance + */ + SupervisedHyperParameters.prototype.learningRate = 0; + /** * SupervisedHyperParameters adapterSize. * @member {google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize} adapterSize @@ -559093,6 +560151,14 @@ */ SupervisedHyperParameters.prototype.adapterSize = 0; + /** + * SupervisedHyperParameters batchSize. + * @member {number|Long} batchSize + * @memberof google.cloud.aiplatform.v1beta1.SupervisedHyperParameters + * @instance + */ + SupervisedHyperParameters.prototype.batchSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * Creates a new SupervisedHyperParameters instance using the specified properties. * @function create @@ -559123,6 +560189,10 @@ writer.uint32(/* id 2, wireType 1 =*/17).double(message.learningRateMultiplier); if (message.adapterSize != null && Object.hasOwnProperty.call(message, "adapterSize")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.adapterSize); + if (message.batchSize != null && Object.hasOwnProperty.call(message, "batchSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.batchSize); + if (message.learningRate != null && Object.hasOwnProperty.call(message, "learningRate")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.learningRate); return writer; }; @@ -559167,10 +560237,18 @@ message.learningRateMultiplier = reader.double(); break; } + case 6: { + message.learningRate = reader.double(); + break; + } case 3: { message.adapterSize = reader.int32(); break; } + case 5: { + message.batchSize = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -559212,6 +560290,9 @@ if (message.learningRateMultiplier != null && message.hasOwnProperty("learningRateMultiplier")) if (typeof message.learningRateMultiplier !== "number") return "learningRateMultiplier: number expected"; + if (message.learningRate != null && message.hasOwnProperty("learningRate")) + if (typeof message.learningRate !== "number") + return "learningRate: number expected"; if (message.adapterSize != null && message.hasOwnProperty("adapterSize")) switch (message.adapterSize) { default: @@ -559225,6 +560306,9 @@ case 5: break; } + if (message.batchSize != null && message.hasOwnProperty("batchSize")) + if (!$util.isInteger(message.batchSize) && !(message.batchSize && $util.isInteger(message.batchSize.low) && $util.isInteger(message.batchSize.high))) + return "batchSize: integer|Long expected"; return null; }; @@ -559251,6 +560335,8 @@ message.epochCount = new $util.LongBits(object.epochCount.low >>> 0, object.epochCount.high >>> 0).toNumber(); if (object.learningRateMultiplier != null) message.learningRateMultiplier = Number(object.learningRateMultiplier); + if (object.learningRate != null) + message.learningRate = Number(object.learningRate); switch (object.adapterSize) { default: if (typeof object.adapterSize === "number") { @@ -559287,6 +560373,15 @@ message.adapterSize = 5; break; } + if (object.batchSize != null) + if ($util.Long) + (message.batchSize = $util.Long.fromValue(object.batchSize)).unsigned = false; + else if (typeof object.batchSize === "string") + message.batchSize = parseInt(object.batchSize, 10); + else if (typeof object.batchSize === "number") + message.batchSize = object.batchSize; + else if (typeof object.batchSize === "object") + message.batchSize = new $util.LongBits(object.batchSize.low >>> 0, object.batchSize.high >>> 0).toNumber(); return message; }; @@ -559311,6 +560406,12 @@ object.epochCount = options.longs === String ? "0" : 0; object.learningRateMultiplier = 0; object.adapterSize = options.enums === String ? "ADAPTER_SIZE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.batchSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.batchSize = options.longs === String ? "0" : 0; + object.learningRate = 0; } if (message.epochCount != null && message.hasOwnProperty("epochCount")) if (typeof message.epochCount === "number") @@ -559321,6 +560422,13 @@ object.learningRateMultiplier = options.json && !isFinite(message.learningRateMultiplier) ? String(message.learningRateMultiplier) : message.learningRateMultiplier; if (message.adapterSize != null && message.hasOwnProperty("adapterSize")) object.adapterSize = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize[message.adapterSize] === undefined ? message.adapterSize : $root.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.AdapterSize[message.adapterSize] : message.adapterSize; + if (message.batchSize != null && message.hasOwnProperty("batchSize")) + if (typeof message.batchSize === "number") + object.batchSize = options.longs === String ? String(message.batchSize) : message.batchSize; + else + object.batchSize = options.longs === String ? $util.Long.prototype.toString.call(message.batchSize) : options.longs === Number ? new $util.LongBits(message.batchSize.low >>> 0, message.batchSize.high >>> 0).toNumber() : message.batchSize; + if (message.learningRate != null && message.hasOwnProperty("learningRate")) + object.learningRate = options.json && !isFinite(message.learningRate) ? String(message.learningRate) : message.learningRate; return object; }; @@ -559387,6 +560495,7 @@ * @property {string|null} [validationDatasetUri] SupervisedTuningSpec validationDatasetUri * @property {google.cloud.aiplatform.v1beta1.ISupervisedHyperParameters|null} [hyperParameters] SupervisedTuningSpec hyperParameters * @property {boolean|null} [exportLastCheckpointOnly] SupervisedTuningSpec exportLastCheckpointOnly + * @property {google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode|null} [tuningMode] SupervisedTuningSpec tuningMode */ /** @@ -559436,6 +560545,14 @@ */ SupervisedTuningSpec.prototype.exportLastCheckpointOnly = false; + /** + * SupervisedTuningSpec tuningMode. + * @member {google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode} tuningMode + * @memberof google.cloud.aiplatform.v1beta1.SupervisedTuningSpec + * @instance + */ + SupervisedTuningSpec.prototype.tuningMode = 0; + /** * Creates a new SupervisedTuningSpec instance using the specified properties. * @function create @@ -559468,6 +560585,8 @@ $root.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.encode(message.hyperParameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.exportLastCheckpointOnly != null && Object.hasOwnProperty.call(message, "exportLastCheckpointOnly")) writer.uint32(/* id 6, wireType 0 =*/48).bool(message.exportLastCheckpointOnly); + if (message.tuningMode != null && Object.hasOwnProperty.call(message, "tuningMode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.tuningMode); return writer; }; @@ -559520,6 +560639,10 @@ message.exportLastCheckpointOnly = reader.bool(); break; } + case 7: { + message.tuningMode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -559569,6 +560692,15 @@ if (message.exportLastCheckpointOnly != null && message.hasOwnProperty("exportLastCheckpointOnly")) if (typeof message.exportLastCheckpointOnly !== "boolean") return "exportLastCheckpointOnly: boolean expected"; + if (message.tuningMode != null && message.hasOwnProperty("tuningMode")) + switch (message.tuningMode) { + default: + return "tuningMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -559595,6 +560727,26 @@ } if (object.exportLastCheckpointOnly != null) message.exportLastCheckpointOnly = Boolean(object.exportLastCheckpointOnly); + switch (object.tuningMode) { + default: + if (typeof object.tuningMode === "number") { + message.tuningMode = object.tuningMode; + break; + } + break; + case "TUNING_MODE_UNSPECIFIED": + case 0: + message.tuningMode = 0; + break; + case "TUNING_MODE_FULL": + case 1: + message.tuningMode = 1; + break; + case "TUNING_MODE_PEFT_ADAPTER": + case 2: + message.tuningMode = 2; + break; + } return message; }; @@ -559616,6 +560768,7 @@ object.validationDatasetUri = ""; object.hyperParameters = null; object.exportLastCheckpointOnly = false; + object.tuningMode = options.enums === String ? "TUNING_MODE_UNSPECIFIED" : 0; } if (message.trainingDatasetUri != null && message.hasOwnProperty("trainingDatasetUri")) object.trainingDatasetUri = message.trainingDatasetUri; @@ -559625,6 +560778,8 @@ object.hyperParameters = $root.google.cloud.aiplatform.v1beta1.SupervisedHyperParameters.toObject(message.hyperParameters, options); if (message.exportLastCheckpointOnly != null && message.hasOwnProperty("exportLastCheckpointOnly")) object.exportLastCheckpointOnly = message.exportLastCheckpointOnly; + if (message.tuningMode != null && message.hasOwnProperty("tuningMode")) + object.tuningMode = options.enums === String ? $root.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode[message.tuningMode] === undefined ? message.tuningMode : $root.google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode[message.tuningMode] : message.tuningMode; return object; }; @@ -559654,6 +560809,22 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.SupervisedTuningSpec"; }; + /** + * TuningMode enum. + * @name google.cloud.aiplatform.v1beta1.SupervisedTuningSpec.TuningMode + * @enum {number} + * @property {number} TUNING_MODE_UNSPECIFIED=0 TUNING_MODE_UNSPECIFIED value + * @property {number} TUNING_MODE_FULL=1 TUNING_MODE_FULL value + * @property {number} TUNING_MODE_PEFT_ADAPTER=2 TUNING_MODE_PEFT_ADAPTER value + */ + SupervisedTuningSpec.TuningMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TUNING_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TUNING_MODE_FULL"] = 1; + values[valuesById[2] = "TUNING_MODE_PEFT_ADAPTER"] = 2; + return values; + })(); + return SupervisedTuningSpec; })(); @@ -631489,6 +632660,7 @@ * @interface IDeployRequest * @property {string|null} [publisherModelName] DeployRequest publisherModelName * @property {string|null} [huggingFaceModelId] DeployRequest huggingFaceModelId + * @property {google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel|null} [customModel] DeployRequest customModel * @property {string|null} [destination] DeployRequest destination * @property {google.cloud.aiplatform.v1beta1.DeployRequest.IModelConfig|null} [modelConfig] DeployRequest modelConfig * @property {google.cloud.aiplatform.v1beta1.DeployRequest.IEndpointConfig|null} [endpointConfig] DeployRequest endpointConfig @@ -631526,6 +632698,14 @@ */ DeployRequest.prototype.huggingFaceModelId = null; + /** + * DeployRequest customModel. + * @member {google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel|null|undefined} customModel + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest + * @instance + */ + DeployRequest.prototype.customModel = null; + /** * DeployRequest destination. * @member {string} destination @@ -631563,12 +632743,12 @@ /** * DeployRequest artifacts. - * @member {"publisherModelName"|"huggingFaceModelId"|undefined} artifacts + * @member {"publisherModelName"|"huggingFaceModelId"|"customModel"|undefined} artifacts * @memberof google.cloud.aiplatform.v1beta1.DeployRequest * @instance */ Object.defineProperty(DeployRequest.prototype, "artifacts", { - get: $util.oneOfGetter($oneOfFields = ["publisherModelName", "huggingFaceModelId"]), + get: $util.oneOfGetter($oneOfFields = ["publisherModelName", "huggingFaceModelId", "customModel"]), set: $util.oneOfSetter($oneOfFields) }); @@ -631600,6 +632780,8 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.publisherModelName); if (message.huggingFaceModelId != null && Object.hasOwnProperty.call(message, "huggingFaceModelId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.huggingFaceModelId); + if (message.customModel != null && Object.hasOwnProperty.call(message, "customModel")) + $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.encode(message.customModel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.destination != null && Object.hasOwnProperty.call(message, "destination")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.destination); if (message.modelConfig != null && Object.hasOwnProperty.call(message, "modelConfig")) @@ -631652,6 +632834,10 @@ message.huggingFaceModelId = reader.string(); break; } + case 3: { + message.customModel = $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.decode(reader, reader.uint32()); + break; + } case 4: { message.destination = reader.string(); break; @@ -631716,6 +632902,16 @@ if (!$util.isString(message.huggingFaceModelId)) return "huggingFaceModelId: string expected"; } + if (message.customModel != null && message.hasOwnProperty("customModel")) { + if (properties.artifacts === 1) + return "artifacts: multiple values"; + properties.artifacts = 1; + { + var error = $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.verify(message.customModel); + if (error) + return "customModel." + error; + } + } if (message.destination != null && message.hasOwnProperty("destination")) if (!$util.isString(message.destination)) return "destination: string expected"; @@ -631753,6 +632949,11 @@ message.publisherModelName = String(object.publisherModelName); if (object.huggingFaceModelId != null) message.huggingFaceModelId = String(object.huggingFaceModelId); + if (object.customModel != null) { + if (typeof object.customModel !== "object") + throw TypeError(".google.cloud.aiplatform.v1beta1.DeployRequest.customModel: object expected"); + message.customModel = $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.fromObject(object.customModel); + } if (object.destination != null) message.destination = String(object.destination); if (object.modelConfig != null) { @@ -631802,6 +633003,11 @@ if (options.oneofs) object.artifacts = "huggingFaceModelId"; } + if (message.customModel != null && message.hasOwnProperty("customModel")) { + object.customModel = $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.toObject(message.customModel, options); + if (options.oneofs) + object.artifacts = "customModel"; + } if (message.destination != null && message.hasOwnProperty("destination")) object.destination = message.destination; if (message.modelConfig != null && message.hasOwnProperty("modelConfig")) @@ -631839,6 +633045,229 @@ return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeployRequest"; }; + DeployRequest.CustomModel = (function() { + + /** + * Properties of a CustomModel. + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest + * @interface ICustomModel + * @property {string|null} [gcsUri] CustomModel gcsUri + */ + + /** + * Constructs a new CustomModel. + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest + * @classdesc Represents a CustomModel. + * @implements ICustomModel + * @constructor + * @param {google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel=} [properties] Properties to set + */ + function CustomModel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomModel gcsUri. + * @member {string|null|undefined} gcsUri + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @instance + */ + CustomModel.prototype.gcsUri = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomModel modelSource. + * @member {"gcsUri"|undefined} modelSource + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @instance + */ + Object.defineProperty(CustomModel.prototype, "modelSource", { + get: $util.oneOfGetter($oneOfFields = ["gcsUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomModel instance using the specified properties. + * @function create + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel=} [properties] Properties to set + * @returns {google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel} CustomModel instance + */ + CustomModel.create = function create(properties) { + return new CustomModel(properties); + }; + + /** + * Encodes the specified CustomModel message. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.verify|verify} messages. + * @function encode + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel} message CustomModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomModel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gcsUri != null && Object.hasOwnProperty.call(message, "gcsUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.gcsUri); + return writer; + }; + + /** + * Encodes the specified CustomModel message, length delimited. Does not implicitly {@link google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {google.cloud.aiplatform.v1beta1.DeployRequest.ICustomModel} message CustomModel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomModel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomModel message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel} CustomModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomModel.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.gcsUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomModel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel} CustomModel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomModel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomModel message. + * @function verify + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomModel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + properties.modelSource = 1; + if (!$util.isString(message.gcsUri)) + return "gcsUri: string expected"; + } + return null; + }; + + /** + * Creates a CustomModel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel} CustomModel + */ + CustomModel.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel) + return object; + var message = new $root.google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel(); + if (object.gcsUri != null) + message.gcsUri = String(object.gcsUri); + return message; + }; + + /** + * Creates a plain object from a CustomModel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel} message CustomModel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomModel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.gcsUri != null && message.hasOwnProperty("gcsUri")) { + object.gcsUri = message.gcsUri; + if (options.oneofs) + object.modelSource = "gcsUri"; + } + return object; + }; + + /** + * Converts this CustomModel to JSON. + * @function toJSON + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @instance + * @returns {Object.} JSON object + */ + CustomModel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomModel + * @function getTypeUrl + * @memberof google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomModel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel"; + }; + + return CustomModel; + })(); + DeployRequest.ModelConfig = (function() { /** @@ -779768,6 +781197,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -779802,6 +781232,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -779834,6 +781272,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -779885,6 +781325,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -779936,6 +781380,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -779978,6 +781427,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -779996,8 +781450,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -780005,6 +781461,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -781827,6 +783285,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -781852,6 +783311,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -781878,6 +783345,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -781918,6 +783387,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -781958,6 +783431,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -781978,6 +783456,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -781994,10 +783477,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -782027,6 +783514,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -782903,6 +784642,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -782914,6 +784654,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -782928,6 +784669,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -782954,6 +784703,9 @@ 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(); return writer; }; @@ -782984,7 +784736,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -782994,6 +784746,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -783034,6 +784809,14 @@ 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"; + } return null; }; @@ -783054,6 +784837,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -783070,10 +784860,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -783712,6 +785510,251 @@ return values; })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + /** * LaunchStage enum. * @name google.api.LaunchStage @@ -784264,6 +786307,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -784278,6 +786322,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -784302,6 +786347,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -784324,6 +786370,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -784374,6 +786421,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -784495,6 +786550,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -784567,6 +786625,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -784669,6 +786733,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -784723,6 +786794,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -784775,6 +786847,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -784838,6 +786917,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -784903,6 +786986,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -784959,6 +787043,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -785007,6 +787096,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -785112,6 +787202,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -785164,6 +787262,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -785256,6 +787356,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -785369,6 +787473,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -785468,6 +787581,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -785497,6 +787630,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -785542,6 +787676,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -787586,6 +789722,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -787646,6 +789783,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -787683,6 +789828,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -787745,6 +789892,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -787813,6 +789964,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -787862,6 +790022,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -787886,6 +790066,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -787906,6 +790087,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -790224,6 +792407,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -790344,6 +792528,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -790418,6 +792610,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -790519,6 +792713,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -790654,6 +792852,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -790842,6 +793045,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -790939,6 +793147,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -790971,6 +793180,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -791243,6 +793454,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -791284,6 +793496,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -791383,6 +793599,488 @@ return EditionDefault; })(); + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + return FieldOptions; })(); @@ -791975,6 +794673,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -792018,6 +794717,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -792056,6 +794763,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -792107,6 +794816,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -792159,6 +794872,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -792192,6 +794910,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -792224,6 +794947,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -792231,6 +794955,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -793698,6 +796424,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -793763,6 +796491,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -793799,6 +796543,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -793859,6 +796607,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -793949,6 +796705,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -794088,6 +796864,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -794111,6 +796935,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -794124,6 +796950,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -794251,6 +797081,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -794435,6 +797478,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -794452,6 +797496,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -794500,6 +797545,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -794552,6 +797601,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -794660,7 +797713,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -794687,12 +797741,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -794718,10 +797780,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -794762,8 +797826,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -794806,6 +797874,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -794818,10 +797887,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -794849,6 +797923,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -794890,10 +797968,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -794912,13 +797995,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -796133,6 +799219,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Struct = (function() { /** diff --git a/packages/google-cloud-aiplatform/protos/protos.json b/packages/google-cloud-aiplatform/protos/protos.json index 243586f7b115..948993ebaec4 100644 --- a/packages/google-cloud-aiplatform/protos/protos.json +++ b/packages/google-cloud-aiplatform/protos/protos.json @@ -30351,6 +30351,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "taskUniqueName": { + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -38940,6 +38947,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "flexStart": { + "type": "FlexStart", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -39069,6 +39083,14 @@ } } }, + "FlexStart": { + "fields": { + "maxRuntimeDuration": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, "ReservationAffinity": { "fields": { "reservationAffinityType": { @@ -48321,6 +48343,13 @@ }, "EvaluateDatasetResponse": { "fields": { + "aggregationOutput": { + "type": "AggregationOutput", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "outputInfo": { "type": "OutputInfo", "id": 3, @@ -48348,6 +48377,58 @@ } } }, + "AggregationOutput": { + "fields": { + "dataset": { + "type": "EvaluationDataset", + "id": 1 + }, + "aggregationResults": { + "rule": "repeated", + "type": "AggregationResult", + "id": 2 + } + } + }, + "AggregationResult": { + "oneofs": { + "aggregationResult": { + "oneof": [ + "pointwiseMetricResult", + "pairwiseMetricResult", + "exactMatchMetricValue", + "bleuMetricValue", + "rougeMetricValue" + ] + } + }, + "fields": { + "pointwiseMetricResult": { + "type": "PointwiseMetricResult", + "id": 5 + }, + "pairwiseMetricResult": { + "type": "PairwiseMetricResult", + "id": 6 + }, + "exactMatchMetricValue": { + "type": "ExactMatchMetricValue", + "id": 7 + }, + "bleuMetricValue": { + "type": "BleuMetricValue", + "id": 8 + }, + "rougeMetricValue": { + "type": "RougeMetricValue", + "id": 9 + }, + "aggregationMetric": { + "type": "Metric.AggregationMetric", + "id": 4 + } + } + }, "EvaluateDatasetRequest": { "fields": { "location": { @@ -60002,6 +60083,13 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "customBaseModel": { + "type": "string", + "id": 26, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "state": { "type": "JobState", "id": 6, @@ -60089,6 +60177,13 @@ "serviceAccount": { "type": "string", "id": 22 + }, + "outputUri": { + "type": "string", + "id": 25, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -60514,12 +60609,26 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "learningRate": { + "type": "double", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "adapterSize": { "type": "AdapterSize", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "batchSize": { + "type": "int64", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -60565,6 +60674,19 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "tuningMode": { + "type": "TuningMode", + "id": 7 + } + }, + "nested": { + "TuningMode": { + "values": { + "TUNING_MODE_UNSPECIFIED": 0, + "TUNING_MODE_FULL": 1, + "TUNING_MODE_PEFT_ADAPTER": 2 + } } } }, @@ -68669,7 +68791,8 @@ "artifacts": { "oneof": [ "publisherModelName", - "huggingFaceModelId" + "huggingFaceModelId", + "customModel" ] } }, @@ -68685,6 +68808,10 @@ "type": "string", "id": 2 }, + "customModel": { + "type": "CustomModel", + "id": 3 + }, "destination": { "type": "string", "id": 4, @@ -68716,6 +68843,24 @@ } }, "nested": { + "CustomModel": { + "oneofs": { + "modelSource": { + "oneof": [ + "gcsUri" + ] + } + }, + "fields": { + "gcsUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, "ModelConfig": { "fields": { "acceptEula": { @@ -84211,8 +84356,7 @@ "java_multiple_files": true, "java_outer_classname": "HttpBodyProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "fieldBehavior": { @@ -84435,6 +84579,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -84575,6 +84723,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -84632,6 +84802,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -84693,6 +84868,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -84743,12 +84931,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -84787,6 +84982,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -84875,6 +85075,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -85100,6 +85304,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -85314,6 +85522,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -85449,7 +85658,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -85477,6 +85687,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -85546,6 +85760,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -85634,6 +85868,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -85776,6 +86014,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -85786,6 +86025,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -85796,6 +86036,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -85806,6 +86047,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -85816,7 +86058,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -85826,27 +86069,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -85891,7 +86145,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -85906,6 +86166,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -85933,11 +86220,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -85950,6 +86252,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -86035,6 +86343,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Struct": { "fields": { "fields": { @@ -86345,6 +86661,7 @@ "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", "php_namespace": "Google\\LongRunning" }, "nested": { 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 f481b26f8213..fbef2cab2ffa 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": "4.3.0", + "version": "4.4.0", "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 5b40749bd5b0..c505da59fe80 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": "4.3.0", + "version": "4.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.deploy.js b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.deploy.js index 8a443d26fd86..b6a72480b6e5 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.deploy.js +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/model_garden_service.deploy.js @@ -40,6 +40,10 @@ function main(destination) { * Format: Hugging Face model ID like `google/gemma-2-2b-it`. */ // const huggingFaceModelId = 'abc123' + /** + * The custom model to deploy from a Google Cloud Storage URI. + */ + // const customModel = {} /** * Required. The resource name of the Location to deploy the model in. * Format: `projects/{project}/locations/{location}` 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 b3f209c86daa..0451d9651235 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": "4.3.0", + "version": "4.4.0", "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 43add2472deb..335fcae5fbad 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": "4.3.0", + "version": "4.4.0", "language": "TYPESCRIPT", "apis": [ { @@ -10622,7 +10622,7 @@ "segments": [ { "start": 25, - "end": 82, + "end": 86, "type": "FULL" } ], @@ -10639,6 +10639,10 @@ "name": "hugging_face_model_id", "type": "TYPE_STRING" }, + { + "name": "custom_model", + "type": ".google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel" + }, { "name": "destination", "type": "TYPE_STRING" diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index a67f2c05a7b3..511a891e98a7 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": "^4.3.0" + "@google-cloud/aiplatform": "^4.4.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts index f84a63985399..a43f6597c565 100644 --- a/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts +++ b/packages/google-cloud-aiplatform/src/v1beta1/model_garden_service_client.ts @@ -916,6 +916,8 @@ export class ModelGardenServiceClient { * @param {string} request.huggingFaceModelId * The Hugging Face model to deploy. * Format: Hugging Face model ID like `google/gemma-2-2b-it`. + * @param {google.cloud.aiplatform.v1beta1.DeployRequest.CustomModel} request.customModel + * The custom model to deploy from a Google Cloud Storage URI. * @param {string} request.destination * Required. The resource name of the Location to deploy the model in. * Format: `projects/{project}/locations/{location}` diff --git a/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md b/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md index e740ae29857f..e91cc4a33230 100644 --- a/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md +++ b/packages/google-cloud-bigquery-datapolicies/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-datapolicies-v2.1.0...bigquery-datapolicies-v2.2.0) (2025-07-17) + + +### Features + +* [bigquery-datapolicies] Release v2beta1 version containing Data Policy on Column ([#6480](https://github.com/googleapis/google-cloud-node/issues/6480)) ([e30eb7c](https://github.com/googleapis/google-cloud-node/commit/e30eb7c9ca1a668d02aa46e7197ac21414e8250f)) + ## [2.1.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-datapolicies-v2.0.1...bigquery-datapolicies-v2.1.0) (2025-07-09) diff --git a/packages/google-cloud-bigquery-datapolicies/README.md b/packages/google-cloud-bigquery-datapolicies/README.md index 4f47b1bd912b..718e045d8119 100644 --- a/packages/google-cloud-bigquery-datapolicies/README.md +++ b/packages/google-cloud-bigquery-datapolicies/README.md @@ -129,6 +129,16 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Data_policy_service.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/data_policy_service.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/data_policy_service.set_iam_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | | Data_policy_service.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/data_policy_service.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/data_policy_service.test_iam_permissions.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | | Data_policy_service.update_data_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/data_policy_service.update_data_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/data_policy_service.update_data_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.add_grantees | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.create_data_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.delete_data_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.get_data_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.get_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.list_data_policies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.remove_grantees | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.set_iam_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.test_iam_permissions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | +| Data_policy_service.update_data_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | | Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/quickstart.js,packages/google-cloud-bigquery-datapolicies/samples/README.md) | diff --git a/packages/google-cloud-bigquery-datapolicies/package.json b/packages/google-cloud-bigquery-datapolicies/package.json index 8891e17d0106..6f6ad2b4dbdf 100644 --- a/packages/google-cloud-bigquery-datapolicies/package.json +++ b/packages/google-cloud-bigquery-datapolicies/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/bigquery-datapolicies", - "version": "2.1.0", + "version": "2.2.0", "description": " client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-bigquery-datapolicies/protos/google/cloud/bigquery/datapolicies/v2beta1/datapolicy.proto b/packages/google-cloud-bigquery-datapolicies/protos/google/cloud/bigquery/datapolicies/v2beta1/datapolicy.proto new file mode 100644 index 000000000000..b6109734a065 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/protos/google/cloud/bigquery/datapolicies/v2beta1/datapolicy.proto @@ -0,0 +1,416 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.bigquery.datapolicies.v2beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.DataPolicies.V2Beta1"; +option go_package = "cloud.google.com/go/bigquery/datapolicies/apiv2beta1/datapoliciespb;datapoliciespb"; +option java_multiple_files = true; +option java_outer_classname = "DataPolicyProto"; +option java_package = "com.google.cloud.bigquery.datapolicies.v2beta1"; +option php_namespace = "Google\\Cloud\\BigQuery\\DataPolicies\\V2beta1"; +option ruby_package = "Google::Cloud::Bigquery::DataPolicies::V2beta1"; +option (google.api.resource_definition) = { + type: "datacatalog.googleapis.com/PolicyTag" + pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" +}; + +// Data Policy Service provides APIs for managing the BigQuery Data Policy. +service DataPolicyService { + option (google.api.default_host) = "bigquerydatapolicy.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/bigquery," + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a new data policy under a project with the given `data_policy_id` + // (used as the display name), and data policy type. + rpc CreateDataPolicy(CreateDataPolicyRequest) returns (DataPolicy) { + option (google.api.http) = { + post: "/v2beta1/{parent=projects/*/locations/*}/dataPolicies" + body: "*" + }; + option (google.api.method_signature) = "parent,data_policy,data_policy_id"; + } + + // Adds new grantees to a data policy. + // The new grantees will be added to the existing grantees. + // If the request contains a duplicate grantee, the grantee will be ignored. + // If the request contains a grantee that already exists, the grantee will be + // ignored. + rpc AddGrantees(AddGranteesRequest) returns (DataPolicy) { + option (google.api.http) = { + post: "/v2beta1/{data_policy=projects/*/locations/*/dataPolicies/*}:addGrantees" + body: "*" + }; + option (google.api.method_signature) = "data_policy,grantees"; + } + + // Removes grantees from a data policy. + // The grantees will be removed from the existing grantees. + // If the request contains a grantee that does not exist, the grantee will be + // ignored. + rpc RemoveGrantees(RemoveGranteesRequest) returns (DataPolicy) { + option (google.api.http) = { + post: "/v2beta1/{data_policy=projects/*/locations/*/dataPolicies/*}:removeGrantees" + body: "*" + }; + option (google.api.method_signature) = "data_policy,grantees"; + } + + // Updates the metadata for an existing data policy. The target data policy + // can be specified by the resource name. + rpc UpdateDataPolicy(UpdateDataPolicyRequest) returns (DataPolicy) { + option (google.api.http) = { + patch: "/v2beta1/{data_policy.name=projects/*/locations/*/dataPolicies/*}" + body: "data_policy" + }; + option (google.api.method_signature) = "data_policy,update_mask"; + } + + // Deletes the data policy specified by its resource name. + rpc DeleteDataPolicy(DeleteDataPolicyRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta1/{name=projects/*/locations/*/dataPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Gets the data policy specified by its resource name. + rpc GetDataPolicy(GetDataPolicyRequest) returns (DataPolicy) { + option (google.api.http) = { + get: "/v2beta1/{name=projects/*/locations/*/dataPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List all of the data policies in the specified parent project. + rpc ListDataPolicies(ListDataPoliciesRequest) + returns (ListDataPoliciesResponse) { + option (google.api.http) = { + get: "/v2beta1/{parent=projects/*/locations/*}/dataPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the IAM policy for the specified data policy. + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy" + body: "*" + }; + } + + // Sets the IAM policy for the specified data policy. + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) + returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy" + body: "*" + }; + } + + // Returns the caller's permission on the specified data policy resource. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) + returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions" + body: "*" + }; + } +} + +// Request message for the CreateDataPolicy method. +message CreateDataPolicyRequest { + // Required. Resource name of the project that the data policy will belong to. + // The format is `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigquerydatapolicy.googleapis.com/DataPolicy" + } + ]; + + // Required. User-assigned (human readable) ID of the data policy that needs + // to be unique within a project. Used as {data_policy_id} in part of the + // resource name. + string data_policy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The data policy to create. The `name` field does not need to be + // provided for the data policy creation. + DataPolicy data_policy = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the UpdateDataPolicy method. +message UpdateDataPolicyRequest { + // Required. Update the data policy's metadata. + // + // The target data policy is determined by the `name` field. + // Other fields are updated to the specified values based on the field masks. + DataPolicy data_policy = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The update mask applies to the resource. For the `FieldMask` + // definition, see + // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + // If not set, defaults to all of the fields that are allowed to update. + // + // Updates to the `name` and `dataPolicyId` fields are not allowed. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for the AddGrantees method. +message AddGranteesRequest { + // Required. Resource name of this data policy, in the format of + // `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + string data_policy = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatapolicy.googleapis.com/DataPolicy" + } + ]; + + // Required. IAM principal that should be granted Fine Grained Access to the + // underlying data goverened by the data policy. The target data policy is + // determined by the `data_policy` field. + // + // Uses the [IAM V2 principal + // syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2). + // Supported principal types: + // + // * User + // * Group + // * Service account + repeated string grantees = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the RemoveGrantees method. +message RemoveGranteesRequest { + // Required. Resource name of this data policy, in the format of + // `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + string data_policy = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatapolicy.googleapis.com/DataPolicy" + } + ]; + + // Required. IAM principal that should be revoked from Fine Grained Access to + // the underlying data goverened by the data policy. The target data policy is + // determined by the `data_policy` field. + // + // Uses the [IAM V2 principal + // syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2). + // Supported principal types: + // + // * User + // * Group + // * Service account + repeated string grantees = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the DeleteDataPolicy method. +message DeleteDataPolicyRequest { + // Required. Resource name of the data policy to delete. Format is + // `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatapolicy.googleapis.com/DataPolicy" + } + ]; +} + +// Request message for the GetDataPolicy method. +message GetDataPolicyRequest { + // Required. Resource name of the requested data policy. Format is + // `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerydatapolicy.googleapis.com/DataPolicy" + } + ]; +} + +// Request message for the ListDataPolicies method. +message ListDataPoliciesRequest { + // Required. Resource name of the project for which to list data policies. + // Format is `projects/{project_number}/locations/{location_id}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "bigquerydatapolicy.googleapis.com/DataPolicy" + } + ]; + + // Optional. The maximum number of data policies to return. Must be a value + // between 1 and 1000. If not set, defaults to 50. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The `nextPageToken` value returned from a previous list request, + // if any. If not set, defaults to an empty string. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the ListDataPolicies method. +message ListDataPoliciesResponse { + // Data policies that belong to the requested project. + repeated DataPolicy data_policies = 1; + + // Token used to retrieve the next page of results, or empty if there are no + // more results. + string next_page_token = 2; +} + +// Represents the label-policy binding. +message DataPolicy { + option (google.api.resource) = { + type: "bigquerydatapolicy.googleapis.com/DataPolicy" + pattern: "projects/{project}/locations/{location}/dataPolicies/{data_policy}" + plural: "dataPolicies" + singular: "dataPolicy" + }; + + // A list of supported data policy types. + enum DataPolicyType { + // Default value for the data policy type. This should not be used. + DATA_POLICY_TYPE_UNSPECIFIED = 0; + + // Used to create a data policy for data masking. + DATA_MASKING_POLICY = 1; + + // Used to create a data policy for raw data access. + RAW_DATA_ACCESS_POLICY = 2; + } + + // The supported versions for the Data Policy resource. + enum Version { + // Default value for the data policy version. This should not be used. + VERSION_UNSPECIFIED = 0; + + // V1 data policy version. V1 Data Policies will be present in V2 List api + // response, but can not be created/updated/deleted from V2 api. + V1 = 1; + + // V2 data policy version. + V2 = 2; + } + + // The policy that is bound to this data policy. + oneof policy { + // Optional. The data masking policy that specifies the data masking rule to + // use. It must be set if the data policy type is DATA_MASKING_POLICY. + DataMaskingPolicy data_masking_policy = 7 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Identifier. Resource name of this data policy, in the format of + // `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. User-assigned (human readable) ID of the data policy that + // needs to be unique within a project. Used as {data_policy_id} in part of + // the resource name. + string data_policy_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The etag for this Data Policy. + // This field is used for UpdateDataPolicy calls. If Data Policy exists, this + // field is required and must match the server's etag. It will also be + // populated in the response of GetDataPolicy, CreateDataPolicy, and + // UpdateDataPolicy calls. + optional string etag = 11; + + // Required. Type of data policy. + DataPolicyType data_policy_type = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Policy tag resource name, in the format of + // `projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{policyTag_id}`. + // policy_tag is supported only for V1 data policies. + string policy_tag = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "datacatalog.googleapis.com/PolicyTag" + } + ]; + + // Optional. The list of IAM principals that have Fine Grained Access to the + // underlying data goverened by this data policy. + // + // Uses the [IAM V2 principal + // syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2) Only + // supports principal types users, groups, serviceaccounts, cloudidentity. + // This field is supported in V2 Data Policy only. In case of V1 data policies + // (i.e. verion = 1 and policy_tag is set), this field is not populated. + repeated string grantees = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The version of the Data Policy resource. + Version version = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The policy used to specify data masking rule. +message DataMaskingPolicy { + // The available masking rules. Learn more here: + // https://cloud.google.com/bigquery/docs/column-data-masking-intro#masking_options. + enum PredefinedExpression { + // Default, unspecified predefined expression. No masking will take place + // since no expression is specified. + PREDEFINED_EXPRESSION_UNSPECIFIED = 0; + + // Masking expression to replace data with SHA-256 hash. + SHA256 = 1; + + // Masking expression to replace data with NULLs. + ALWAYS_NULL = 2; + + // Masking expression to replace data with their default masking values. + // The default masking values for each type listed as below: + // + // * STRING: "" + // * BYTES: b'' + // * INTEGER: 0 + // * FLOAT: 0.0 + // * NUMERIC: 0 + // * BOOLEAN: FALSE + // * TIMESTAMP: 1970-01-01 00:00:00 UTC + // * DATE: 1970-01-01 + // * TIME: 00:00:00 + // * DATETIME: 1970-01-01T00:00:00 + // * GEOGRAPHY: POINT(0 0) + // * BIGNUMERIC: 0 + // * ARRAY: [] + // * STRUCT: NOT_APPLICABLE + // * JSON: NULL + DEFAULT_MASKING_VALUE = 3; + } + + // A masking expression to bind to the data masking rule. + oneof masking_expression { + // Optional. A predefined masking expression. + PredefinedExpression predefined_expression = 1 + [(google.api.field_behavior) = OPTIONAL]; + } +} diff --git a/packages/google-cloud-bigquery-datapolicies/protos/protos.d.ts b/packages/google-cloud-bigquery-datapolicies/protos/protos.d.ts index b0bf344e564a..3a7bc7a9003b 100644 --- a/packages/google-cloud-bigquery-datapolicies/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-datapolicies/protos/protos.d.ts @@ -2277,6 +2277,1338 @@ export namespace google { } } } + + /** Namespace v2beta1. */ + namespace v2beta1 { + + /** Represents a DataPolicyService */ + class DataPolicyService extends $protobuf.rpc.Service { + + /** + * Constructs a new DataPolicyService 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 DataPolicyService 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): DataPolicyService; + + /** + * Calls CreateDataPolicy. + * @param request CreateDataPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataPolicy + */ + public createDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.CreateDataPolicyCallback): void; + + /** + * Calls CreateDataPolicy. + * @param request CreateDataPolicyRequest message or plain object + * @returns Promise + */ + public createDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest): Promise; + + /** + * Calls AddGrantees. + * @param request AddGranteesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataPolicy + */ + public addGrantees(request: google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.AddGranteesCallback): void; + + /** + * Calls AddGrantees. + * @param request AddGranteesRequest message or plain object + * @returns Promise + */ + public addGrantees(request: google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest): Promise; + + /** + * Calls RemoveGrantees. + * @param request RemoveGranteesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataPolicy + */ + public removeGrantees(request: google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.RemoveGranteesCallback): void; + + /** + * Calls RemoveGrantees. + * @param request RemoveGranteesRequest message or plain object + * @returns Promise + */ + public removeGrantees(request: google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest): Promise; + + /** + * Calls UpdateDataPolicy. + * @param request UpdateDataPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataPolicy + */ + public updateDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.UpdateDataPolicyCallback): void; + + /** + * Calls UpdateDataPolicy. + * @param request UpdateDataPolicyRequest message or plain object + * @returns Promise + */ + public updateDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest): Promise; + + /** + * Calls DeleteDataPolicy. + * @param request DeleteDataPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.DeleteDataPolicyCallback): void; + + /** + * Calls DeleteDataPolicy. + * @param request DeleteDataPolicyRequest message or plain object + * @returns Promise + */ + public deleteDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest): Promise; + + /** + * Calls GetDataPolicy. + * @param request GetDataPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataPolicy + */ + public getDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetDataPolicyCallback): void; + + /** + * Calls GetDataPolicy. + * @param request GetDataPolicyRequest message or plain object + * @returns Promise + */ + public getDataPolicy(request: google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest): Promise; + + /** + * Calls ListDataPolicies. + * @param request ListDataPoliciesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataPoliciesResponse + */ + public listDataPolicies(request: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.ListDataPoliciesCallback): void; + + /** + * Calls ListDataPolicies. + * @param request ListDataPoliciesRequest message or plain object + * @returns Promise + */ + public listDataPolicies(request: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest): Promise; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetIamPolicyCallback): void; + + /** + * Calls GetIamPolicy. + * @param request GetIamPolicyRequest message or plain object + * @returns Promise + */ + public getIamPolicy(request: google.iam.v1.IGetIamPolicyRequest): Promise; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Policy + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.SetIamPolicyCallback): void; + + /** + * Calls SetIamPolicy. + * @param request SetIamPolicyRequest message or plain object + * @returns Promise + */ + public setIamPolicy(request: google.iam.v1.ISetIamPolicyRequest): Promise; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest, callback: google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.TestIamPermissionsCallback): void; + + /** + * Calls TestIamPermissions. + * @param request TestIamPermissionsRequest message or plain object + * @returns Promise + */ + public testIamPermissions(request: google.iam.v1.ITestIamPermissionsRequest): Promise; + } + + namespace DataPolicyService { + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|createDataPolicy}. + * @param error Error, if any + * @param [response] DataPolicy + */ + type CreateDataPolicyCallback = (error: (Error|null), response?: google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|addGrantees}. + * @param error Error, if any + * @param [response] DataPolicy + */ + type AddGranteesCallback = (error: (Error|null), response?: google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|removeGrantees}. + * @param error Error, if any + * @param [response] DataPolicy + */ + type RemoveGranteesCallback = (error: (Error|null), response?: google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|updateDataPolicy}. + * @param error Error, if any + * @param [response] DataPolicy + */ + type UpdateDataPolicyCallback = (error: (Error|null), response?: google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|deleteDataPolicy}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDataPolicyCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|getDataPolicy}. + * @param error Error, if any + * @param [response] DataPolicy + */ + type GetDataPolicyCallback = (error: (Error|null), response?: google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|listDataPolicies}. + * @param error Error, if any + * @param [response] ListDataPoliciesResponse + */ + type ListDataPoliciesCallback = (error: (Error|null), response?: google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|getIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type GetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|setIamPolicy}. + * @param error Error, if any + * @param [response] Policy + */ + type SetIamPolicyCallback = (error: (Error|null), response?: google.iam.v1.Policy) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|testIamPermissions}. + * @param error Error, if any + * @param [response] TestIamPermissionsResponse + */ + type TestIamPermissionsCallback = (error: (Error|null), response?: google.iam.v1.TestIamPermissionsResponse) => void; + } + + /** Properties of a CreateDataPolicyRequest. */ + interface ICreateDataPolicyRequest { + + /** CreateDataPolicyRequest parent */ + parent?: (string|null); + + /** CreateDataPolicyRequest dataPolicyId */ + dataPolicyId?: (string|null); + + /** CreateDataPolicyRequest dataPolicy */ + dataPolicy?: (google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null); + } + + /** Represents a CreateDataPolicyRequest. */ + class CreateDataPolicyRequest implements ICreateDataPolicyRequest { + + /** + * Constructs a new CreateDataPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest); + + /** CreateDataPolicyRequest parent. */ + public parent: string; + + /** CreateDataPolicyRequest dataPolicyId. */ + public dataPolicyId: string; + + /** CreateDataPolicyRequest dataPolicy. */ + public dataPolicy?: (google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null); + + /** + * Creates a new CreateDataPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataPolicyRequest instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest): google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest; + + /** + * Encodes the specified CreateDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest.verify|verify} messages. + * @param message CreateDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest.verify|verify} messages. + * @param message CreateDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest; + + /** + * Decodes a CreateDataPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest; + + /** + * Verifies a CreateDataPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest; + + /** + * Creates a plain object from a CreateDataPolicyRequest message. Also converts values to other types if specified. + * @param message CreateDataPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataPolicyRequest. */ + interface IUpdateDataPolicyRequest { + + /** UpdateDataPolicyRequest dataPolicy */ + dataPolicy?: (google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null); + + /** UpdateDataPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataPolicyRequest. */ + class UpdateDataPolicyRequest implements IUpdateDataPolicyRequest { + + /** + * Constructs a new UpdateDataPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest); + + /** UpdateDataPolicyRequest dataPolicy. */ + public dataPolicy?: (google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null); + + /** UpdateDataPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataPolicyRequest instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest): google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest; + + /** + * Encodes the specified UpdateDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest.verify|verify} messages. + * @param message UpdateDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest.verify|verify} messages. + * @param message UpdateDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest; + + /** + * Decodes an UpdateDataPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest; + + /** + * Verifies an UpdateDataPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest; + + /** + * Creates a plain object from an UpdateDataPolicyRequest message. Also converts values to other types if specified. + * @param message UpdateDataPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AddGranteesRequest. */ + interface IAddGranteesRequest { + + /** AddGranteesRequest dataPolicy */ + dataPolicy?: (string|null); + + /** AddGranteesRequest grantees */ + grantees?: (string[]|null); + } + + /** Represents an AddGranteesRequest. */ + class AddGranteesRequest implements IAddGranteesRequest { + + /** + * Constructs a new AddGranteesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest); + + /** AddGranteesRequest dataPolicy. */ + public dataPolicy: string; + + /** AddGranteesRequest grantees. */ + public grantees: string[]; + + /** + * Creates a new AddGranteesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AddGranteesRequest instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest): google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest; + + /** + * Encodes the specified AddGranteesRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest.verify|verify} messages. + * @param message AddGranteesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AddGranteesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest.verify|verify} messages. + * @param message AddGranteesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AddGranteesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AddGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest; + + /** + * Decodes an AddGranteesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AddGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest; + + /** + * Verifies an AddGranteesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AddGranteesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AddGranteesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest; + + /** + * Creates a plain object from an AddGranteesRequest message. Also converts values to other types if specified. + * @param message AddGranteesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AddGranteesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AddGranteesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RemoveGranteesRequest. */ + interface IRemoveGranteesRequest { + + /** RemoveGranteesRequest dataPolicy */ + dataPolicy?: (string|null); + + /** RemoveGranteesRequest grantees */ + grantees?: (string[]|null); + } + + /** Represents a RemoveGranteesRequest. */ + class RemoveGranteesRequest implements IRemoveGranteesRequest { + + /** + * Constructs a new RemoveGranteesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest); + + /** RemoveGranteesRequest dataPolicy. */ + public dataPolicy: string; + + /** RemoveGranteesRequest grantees. */ + public grantees: string[]; + + /** + * Creates a new RemoveGranteesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RemoveGranteesRequest instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest): google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest; + + /** + * Encodes the specified RemoveGranteesRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest.verify|verify} messages. + * @param message RemoveGranteesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RemoveGranteesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest.verify|verify} messages. + * @param message RemoveGranteesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RemoveGranteesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RemoveGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest; + + /** + * Decodes a RemoveGranteesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RemoveGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest; + + /** + * Verifies a RemoveGranteesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RemoveGranteesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RemoveGranteesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest; + + /** + * Creates a plain object from a RemoveGranteesRequest message. Also converts values to other types if specified. + * @param message RemoveGranteesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RemoveGranteesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RemoveGranteesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataPolicyRequest. */ + interface IDeleteDataPolicyRequest { + + /** DeleteDataPolicyRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDataPolicyRequest. */ + class DeleteDataPolicyRequest implements IDeleteDataPolicyRequest { + + /** + * Constructs a new DeleteDataPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest); + + /** DeleteDataPolicyRequest name. */ + public name: string; + + /** + * Creates a new DeleteDataPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataPolicyRequest instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest): google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest; + + /** + * Encodes the specified DeleteDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest.verify|verify} messages. + * @param message DeleteDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest.verify|verify} messages. + * @param message DeleteDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest; + + /** + * Decodes a DeleteDataPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest; + + /** + * Verifies a DeleteDataPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest; + + /** + * Creates a plain object from a DeleteDataPolicyRequest message. Also converts values to other types if specified. + * @param message DeleteDataPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataPolicyRequest. */ + interface IGetDataPolicyRequest { + + /** GetDataPolicyRequest name */ + name?: (string|null); + } + + /** Represents a GetDataPolicyRequest. */ + class GetDataPolicyRequest implements IGetDataPolicyRequest { + + /** + * Constructs a new GetDataPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest); + + /** GetDataPolicyRequest name. */ + public name: string; + + /** + * Creates a new GetDataPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataPolicyRequest instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest): google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest; + + /** + * Encodes the specified GetDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest.verify|verify} messages. + * @param message GetDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest.verify|verify} messages. + * @param message GetDataPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest; + + /** + * Decodes a GetDataPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest; + + /** + * Verifies a GetDataPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest; + + /** + * Creates a plain object from a GetDataPolicyRequest message. Also converts values to other types if specified. + * @param message GetDataPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataPoliciesRequest. */ + interface IListDataPoliciesRequest { + + /** ListDataPoliciesRequest parent */ + parent?: (string|null); + + /** ListDataPoliciesRequest pageSize */ + pageSize?: (number|null); + + /** ListDataPoliciesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDataPoliciesRequest. */ + class ListDataPoliciesRequest implements IListDataPoliciesRequest { + + /** + * Constructs a new ListDataPoliciesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest); + + /** ListDataPoliciesRequest parent. */ + public parent: string; + + /** ListDataPoliciesRequest pageSize. */ + public pageSize: number; + + /** ListDataPoliciesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDataPoliciesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataPoliciesRequest instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest; + + /** + * Encodes the specified ListDataPoliciesRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest.verify|verify} messages. + * @param message ListDataPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest.verify|verify} messages. + * @param message ListDataPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataPoliciesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest; + + /** + * Decodes a ListDataPoliciesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest; + + /** + * Verifies a ListDataPoliciesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataPoliciesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest; + + /** + * Creates a plain object from a ListDataPoliciesRequest message. Also converts values to other types if specified. + * @param message ListDataPoliciesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataPoliciesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataPoliciesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataPoliciesResponse. */ + interface IListDataPoliciesResponse { + + /** ListDataPoliciesResponse dataPolicies */ + dataPolicies?: (google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[]|null); + + /** ListDataPoliciesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataPoliciesResponse. */ + class ListDataPoliciesResponse implements IListDataPoliciesResponse { + + /** + * Constructs a new ListDataPoliciesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse); + + /** ListDataPoliciesResponse dataPolicies. */ + public dataPolicies: google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[]; + + /** ListDataPoliciesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataPoliciesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataPoliciesResponse instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse; + + /** + * Encodes the specified ListDataPoliciesResponse message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse.verify|verify} messages. + * @param message ListDataPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse.verify|verify} messages. + * @param message ListDataPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataPoliciesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse; + + /** + * Decodes a ListDataPoliciesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse; + + /** + * Verifies a ListDataPoliciesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataPoliciesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse; + + /** + * Creates a plain object from a ListDataPoliciesResponse message. Also converts values to other types if specified. + * @param message ListDataPoliciesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataPoliciesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataPoliciesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataPolicy. */ + interface IDataPolicy { + + /** DataPolicy dataMaskingPolicy */ + dataMaskingPolicy?: (google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy|null); + + /** DataPolicy name */ + name?: (string|null); + + /** DataPolicy dataPolicyId */ + dataPolicyId?: (string|null); + + /** DataPolicy etag */ + etag?: (string|null); + + /** DataPolicy dataPolicyType */ + dataPolicyType?: (google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType|keyof typeof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType|null); + + /** DataPolicy policyTag */ + policyTag?: (string|null); + + /** DataPolicy grantees */ + grantees?: (string[]|null); + + /** DataPolicy version */ + version?: (google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version|keyof typeof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version|null); + } + + /** Represents a DataPolicy. */ + class DataPolicy implements IDataPolicy { + + /** + * Constructs a new DataPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy); + + /** DataPolicy dataMaskingPolicy. */ + public dataMaskingPolicy?: (google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy|null); + + /** DataPolicy name. */ + public name: string; + + /** DataPolicy dataPolicyId. */ + public dataPolicyId: string; + + /** DataPolicy etag. */ + public etag?: (string|null); + + /** DataPolicy dataPolicyType. */ + public dataPolicyType: (google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType|keyof typeof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType); + + /** DataPolicy policyTag. */ + public policyTag: string; + + /** DataPolicy grantees. */ + public grantees: string[]; + + /** DataPolicy version. */ + public version: (google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version|keyof typeof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version); + + /** DataPolicy policy. */ + public policy?: "dataMaskingPolicy"; + + /** + * Creates a new DataPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns DataPolicy instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy): google.cloud.bigquery.datapolicies.v2beta1.DataPolicy; + + /** + * Encodes the specified DataPolicy message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.verify|verify} messages. + * @param message DataPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataPolicy message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.verify|verify} messages. + * @param message DataPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.DataPolicy; + + /** + * Decodes a DataPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.DataPolicy; + + /** + * Verifies a DataPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.DataPolicy; + + /** + * Creates a plain object from a DataPolicy message. Also converts values to other types if specified. + * @param message DataPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.DataPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataPolicy { + + /** DataPolicyType enum. */ + enum DataPolicyType { + DATA_POLICY_TYPE_UNSPECIFIED = 0, + DATA_MASKING_POLICY = 1, + RAW_DATA_ACCESS_POLICY = 2 + } + + /** Version enum. */ + enum Version { + VERSION_UNSPECIFIED = 0, + V1 = 1, + V2 = 2 + } + } + + /** Properties of a DataMaskingPolicy. */ + interface IDataMaskingPolicy { + + /** DataMaskingPolicy predefinedExpression */ + predefinedExpression?: (google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression|keyof typeof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression|null); + } + + /** Represents a DataMaskingPolicy. */ + class DataMaskingPolicy implements IDataMaskingPolicy { + + /** + * Constructs a new DataMaskingPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy); + + /** DataMaskingPolicy predefinedExpression. */ + public predefinedExpression?: (google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression|keyof typeof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression|null); + + /** DataMaskingPolicy maskingExpression. */ + public maskingExpression?: "predefinedExpression"; + + /** + * Creates a new DataMaskingPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns DataMaskingPolicy instance + */ + public static create(properties?: google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy): google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy; + + /** + * Encodes the specified DataMaskingPolicy message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.verify|verify} messages. + * @param message DataMaskingPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataMaskingPolicy message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.verify|verify} messages. + * @param message DataMaskingPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataMaskingPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataMaskingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy; + + /** + * Decodes a DataMaskingPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataMaskingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy; + + /** + * Verifies a DataMaskingPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataMaskingPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataMaskingPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy; + + /** + * Creates a plain object from a DataMaskingPolicy message. Also converts values to other types if specified. + * @param message DataMaskingPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataMaskingPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataMaskingPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataMaskingPolicy { + + /** PredefinedExpression enum. */ + enum PredefinedExpression { + PREDEFINED_EXPRESSION_UNSPECIFIED = 0, + SHA256 = 1, + ALWAYS_NULL = 2, + DEFAULT_MASKING_VALUE = 3 + } + } + } } } } @@ -2652,6 +3984,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -2669,6 +4004,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -3369,6 +4707,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -3383,6 +4724,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -3439,26 +4783,138 @@ export namespace google { */ 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 }; + /** + * 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; + } + + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ExperimentalFeatures 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; + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a NodeSettings. */ @@ -3787,6 +5243,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -3801,6 +5260,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -4125,6 +5587,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -4506,6 +6071,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -4536,6 +6102,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -4585,6 +6154,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -4719,6 +6291,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -4760,6 +6335,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -5607,6 +7185,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -5633,6 +7214,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -6567,6 +8151,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -6622,6 +8209,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -6842,6 +8432,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -7080,6 +8785,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -7102,6 +8810,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -7691,6 +9402,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -7720,6 +9437,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -7842,6 +9565,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -7961,8 +9794,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -7977,8 +9813,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -8511,6 +10350,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Duration. */ interface IDuration { diff --git a/packages/google-cloud-bigquery-datapolicies/protos/protos.js b/packages/google-cloud-bigquery-datapolicies/protos/protos.js index 48460eef93e3..be2da699210a 100644 --- a/packages/google-cloud-bigquery-datapolicies/protos/protos.js +++ b/packages/google-cloud-bigquery-datapolicies/protos/protos.js @@ -5096,558 +5096,3602 @@ return v1beta1; })(); - return datapolicies; - })(); + datapolicies.v2beta1 = (function() { - return bigquery; - })(); + /** + * Namespace v2beta1. + * @memberof google.cloud.bigquery.datapolicies + * @namespace + */ + var v2beta1 = {}; - return cloud; - })(); + v2beta1.DataPolicyService = (function() { - google.api = (function() { + /** + * Constructs a new DataPolicyService service. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a DataPolicyService + * @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 DataPolicyService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + (DataPolicyService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DataPolicyService; - api.Http = (function() { + /** + * Creates new DataPolicyService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @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 {DataPolicyService} RPC service. Useful where requests and/or responses are streamed. + */ + DataPolicyService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|createDataPolicy}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef CreateDataPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} [response] DataPolicy + */ - /** - * 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]]; - } + /** + * Calls CreateDataPolicy. + * @function createDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest} request CreateDataPolicyRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.CreateDataPolicyCallback} callback Node-style callback called with the error, if any, and DataPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.createDataPolicy = function createDataPolicy(request, callback) { + return this.rpcCall(createDataPolicy, $root.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest, $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy, request, callback); + }, "name", { value: "CreateDataPolicy" }); - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + /** + * Calls CreateDataPolicy. + * @function createDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest} request CreateDataPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|addGrantees}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef AddGranteesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} [response] DataPolicy + */ - /** - * 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); - }; + /** + * Calls AddGrantees. + * @function addGrantees + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest} request AddGranteesRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.AddGranteesCallback} callback Node-style callback called with the error, if any, and DataPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.addGrantees = function addGrantees(request, callback) { + return this.rpcCall(addGrantees, $root.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest, $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy, request, callback); + }, "name", { value: "AddGrantees" }); - /** - * 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; - }; + /** + * Calls AddGrantees. + * @function addGrantees + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest} request AddGranteesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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(); - }; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|removeGrantees}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef RemoveGranteesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} [response] DataPolicy + */ - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls RemoveGrantees. + * @function removeGrantees + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest} request RemoveGranteesRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.RemoveGranteesCallback} callback Node-style callback called with the error, if any, and DataPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.removeGrantees = function removeGrantees(request, callback) { + return this.rpcCall(removeGrantees, $root.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest, $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy, request, callback); + }, "name", { value: "RemoveGrantees" }); - /** - * 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()); - }; + /** + * Calls RemoveGrantees. + * @function removeGrantees + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest} request RemoveGranteesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|updateDataPolicy}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef UpdateDataPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} [response] DataPolicy + */ - /** - * 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; - }; + /** + * Calls UpdateDataPolicy. + * @function updateDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest} request UpdateDataPolicyRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.UpdateDataPolicyCallback} callback Node-style callback called with the error, if any, and DataPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.updateDataPolicy = function updateDataPolicy(request, callback) { + return this.rpcCall(updateDataPolicy, $root.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest, $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy, request, callback); + }, "name", { value: "UpdateDataPolicy" }); - /** - * 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); - }; + /** + * Calls UpdateDataPolicy. + * @function updateDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest} request UpdateDataPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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"; - }; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|deleteDataPolicy}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef DeleteDataPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ - return Http; - })(); + /** + * Calls DeleteDataPolicy. + * @function deleteDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest} request DeleteDataPolicyRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.DeleteDataPolicyCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.deleteDataPolicy = function deleteDataPolicy(request, callback) { + return this.rpcCall(deleteDataPolicy, $root.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDataPolicy" }); - api.HttpRule = (function() { + /** + * Calls DeleteDataPolicy. + * @function deleteDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest} request DeleteDataPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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 - */ + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|getDataPolicy}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef GetDataPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} [response] DataPolicy + */ - /** - * 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]]; - } + /** + * Calls GetDataPolicy. + * @function getDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest} request GetDataPolicyRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetDataPolicyCallback} callback Node-style callback called with the error, if any, and DataPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.getDataPolicy = function getDataPolicy(request, callback) { + return this.rpcCall(getDataPolicy, $root.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest, $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy, request, callback); + }, "name", { value: "GetDataPolicy" }); - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + /** + * Calls GetDataPolicy. + * @function getDataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest} request GetDataPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|listDataPolicies}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef ListDataPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse} [response] ListDataPoliciesResponse + */ - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; + /** + * Calls ListDataPolicies. + * @function listDataPolicies + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest} request ListDataPoliciesRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.ListDataPoliciesCallback} callback Node-style callback called with the error, if any, and ListDataPoliciesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.listDataPolicies = function listDataPolicies(request, callback) { + return this.rpcCall(listDataPolicies, $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest, $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse, request, callback); + }, "name", { value: "ListDataPolicies" }); - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; + /** + * Calls ListDataPolicies. + * @function listDataPolicies + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest} request ListDataPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|getIamPolicy}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef GetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.getIamPolicy = function getIamPolicy(request, callback) { + return this.rpcCall(getIamPolicy, $root.google.iam.v1.GetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "GetIamPolicy" }); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + /** + * Calls GetIamPolicy. + * @function getIamPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.iam.v1.IGetIamPolicyRequest} request GetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|setIamPolicy}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef SetIamPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.Policy} [response] Policy + */ - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.SetIamPolicyCallback} callback Node-style callback called with the error, if any, and Policy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.setIamPolicy = function setIamPolicy(request, callback) { + return this.rpcCall(setIamPolicy, $root.google.iam.v1.SetIamPolicyRequest, $root.google.iam.v1.Policy, request, callback); + }, "name", { value: "SetIamPolicy" }); - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; + /** + * Calls SetIamPolicy. + * @function setIamPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.iam.v1.ISetIamPolicyRequest} request SetIamPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Callback as used by {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService|testIamPermissions}. + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @typedef TestIamPermissionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.iam.v1.TestIamPermissionsResponse} [response] TestIamPermissionsResponse + */ - /** - * 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) - }); + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.TestIamPermissionsCallback} callback Node-style callback called with the error, if any, and TestIamPermissionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DataPolicyService.prototype.testIamPermissions = function testIamPermissions(request, callback) { + return this.rpcCall(testIamPermissions, $root.google.iam.v1.TestIamPermissionsRequest, $root.google.iam.v1.TestIamPermissionsResponse, request, callback); + }, "name", { value: "TestIamPermissions" }); - /** - * 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); - }; + /** + * Calls TestIamPermissions. + * @function testIamPermissions + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService + * @instance + * @param {google.iam.v1.ITestIamPermissionsRequest} request TestIamPermissionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * 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; - }; + return DataPolicyService; + })(); - /** - * 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(); - }; + v2beta1.CreateDataPolicyRequest = (function() { - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + /** + * Properties of a CreateDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface ICreateDataPolicyRequest + * @property {string|null} [parent] CreateDataPolicyRequest parent + * @property {string|null} [dataPolicyId] CreateDataPolicyRequest dataPolicyId + * @property {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null} [dataPolicy] CreateDataPolicyRequest dataPolicy + */ + + /** + * Constructs a new CreateDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a CreateDataPolicyRequest. + * @implements ICreateDataPolicyRequest + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest=} [properties] Properties to set + */ + function CreateDataPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - 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()); - }; + /** + * CreateDataPolicyRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @instance + */ + CreateDataPolicyRequest.prototype.parent = ""; - /** - * 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) { + /** + * CreateDataPolicyRequest dataPolicyId. + * @member {string} dataPolicyId + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @instance + */ + CreateDataPolicyRequest.prototype.dataPolicyId = ""; + + /** + * CreateDataPolicyRequest dataPolicy. + * @member {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null|undefined} dataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @instance + */ + CreateDataPolicyRequest.prototype.dataPolicy = null; + + /** + * Creates a new CreateDataPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest} CreateDataPolicyRequest instance + */ + CreateDataPolicyRequest.create = function create(properties) { + return new CreateDataPolicyRequest(properties); + }; + + /** + * Encodes the specified CreateDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest} message CreateDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataPolicyRequest.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.dataPolicyId != null && Object.hasOwnProperty.call(message, "dataPolicyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataPolicyId); + if (message.dataPolicy != null && Object.hasOwnProperty.call(message, "dataPolicy")) + $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.encode(message.dataPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest} message CreateDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest} CreateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataPolicyId = reader.string(); + break; + } + case 3: { + message.dataPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest} CreateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataPolicyRequest message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataPolicyRequest.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.dataPolicyId != null && message.hasOwnProperty("dataPolicyId")) + if (!$util.isString(message.dataPolicyId)) + return "dataPolicyId: string expected"; + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) { + var error = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.verify(message.dataPolicy); + if (error) + return "dataPolicy." + error; + } + return null; + }; + + /** + * Creates a CreateDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest} CreateDataPolicyRequest + */ + CreateDataPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataPolicyId != null) + message.dataPolicyId = String(object.dataPolicyId); + if (object.dataPolicy != null) { + if (typeof object.dataPolicy !== "object") + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest.dataPolicy: object expected"); + message.dataPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.fromObject(object.dataPolicy); + } + return message; + }; + + /** + * Creates a plain object from a CreateDataPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest} message CreateDataPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataPolicyId = ""; + object.dataPolicy = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataPolicyId != null && message.hasOwnProperty("dataPolicyId")) + object.dataPolicyId = message.dataPolicyId; + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) + object.dataPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.toObject(message.dataPolicy, options); + return object; + }; + + /** + * Converts this CreateDataPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest"; + }; + + return CreateDataPolicyRequest; + })(); + + v2beta1.UpdateDataPolicyRequest = (function() { + + /** + * Properties of an UpdateDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IUpdateDataPolicyRequest + * @property {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null} [dataPolicy] UpdateDataPolicyRequest dataPolicy + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataPolicyRequest updateMask + */ + + /** + * Constructs a new UpdateDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents an UpdateDataPolicyRequest. + * @implements IUpdateDataPolicyRequest + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest=} [properties] Properties to set + */ + function UpdateDataPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataPolicyRequest dataPolicy. + * @member {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null|undefined} dataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @instance + */ + UpdateDataPolicyRequest.prototype.dataPolicy = null; + + /** + * UpdateDataPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @instance + */ + UpdateDataPolicyRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest} UpdateDataPolicyRequest instance + */ + UpdateDataPolicyRequest.create = function create(properties) { + return new UpdateDataPolicyRequest(properties); + }; + + /** + * Encodes the specified UpdateDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest} message UpdateDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPolicy != null && Object.hasOwnProperty.call(message, "dataPolicy")) + $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.encode(message.dataPolicy, 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 UpdateDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest} message UpdateDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest} UpdateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.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 UpdateDataPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest} UpdateDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataPolicyRequest message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) { + var error = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.verify(message.dataPolicy); + if (error) + return "dataPolicy." + 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 UpdateDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest} UpdateDataPolicyRequest + */ + UpdateDataPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest(); + if (object.dataPolicy != null) { + if (typeof object.dataPolicy !== "object") + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest.dataPolicy: object expected"); + message.dataPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.fromObject(object.dataPolicy); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest} message UpdateDataPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataPolicy = null; + object.updateMask = null; + } + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) + object.dataPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.toObject(message.dataPolicy, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest"; + }; + + return UpdateDataPolicyRequest; + })(); + + v2beta1.AddGranteesRequest = (function() { + + /** + * Properties of an AddGranteesRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IAddGranteesRequest + * @property {string|null} [dataPolicy] AddGranteesRequest dataPolicy + * @property {Array.|null} [grantees] AddGranteesRequest grantees + */ + + /** + * Constructs a new AddGranteesRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents an AddGranteesRequest. + * @implements IAddGranteesRequest + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest=} [properties] Properties to set + */ + function AddGranteesRequest(properties) { + this.grantees = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AddGranteesRequest dataPolicy. + * @member {string} dataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @instance + */ + AddGranteesRequest.prototype.dataPolicy = ""; + + /** + * AddGranteesRequest grantees. + * @member {Array.} grantees + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @instance + */ + AddGranteesRequest.prototype.grantees = $util.emptyArray; + + /** + * Creates a new AddGranteesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest} AddGranteesRequest instance + */ + AddGranteesRequest.create = function create(properties) { + return new AddGranteesRequest(properties); + }; + + /** + * Encodes the specified AddGranteesRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest} message AddGranteesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGranteesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPolicy != null && Object.hasOwnProperty.call(message, "dataPolicy")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataPolicy); + if (message.grantees != null && message.grantees.length) + for (var i = 0; i < message.grantees.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.grantees[i]); + return writer; + }; + + /** + * Encodes the specified AddGranteesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest} message AddGranteesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddGranteesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddGranteesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest} AddGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGranteesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataPolicy = reader.string(); + break; + } + case 2: { + if (!(message.grantees && message.grantees.length)) + message.grantees = []; + message.grantees.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddGranteesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest} AddGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddGranteesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddGranteesRequest message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddGranteesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) + if (!$util.isString(message.dataPolicy)) + return "dataPolicy: string expected"; + if (message.grantees != null && message.hasOwnProperty("grantees")) { + if (!Array.isArray(message.grantees)) + return "grantees: array expected"; + for (var i = 0; i < message.grantees.length; ++i) + if (!$util.isString(message.grantees[i])) + return "grantees: string[] expected"; + } + return null; + }; + + /** + * Creates an AddGranteesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest} AddGranteesRequest + */ + AddGranteesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest(); + if (object.dataPolicy != null) + message.dataPolicy = String(object.dataPolicy); + if (object.grantees) { + if (!Array.isArray(object.grantees)) + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest.grantees: array expected"); + message.grantees = []; + for (var i = 0; i < object.grantees.length; ++i) + message.grantees[i] = String(object.grantees[i]); + } + return message; + }; + + /** + * Creates a plain object from an AddGranteesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest} message AddGranteesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddGranteesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.grantees = []; + if (options.defaults) + object.dataPolicy = ""; + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) + object.dataPolicy = message.dataPolicy; + if (message.grantees && message.grantees.length) { + object.grantees = []; + for (var j = 0; j < message.grantees.length; ++j) + object.grantees[j] = message.grantees[j]; + } + return object; + }; + + /** + * Converts this AddGranteesRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @instance + * @returns {Object.} JSON object + */ + AddGranteesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AddGranteesRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AddGranteesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest"; + }; + + return AddGranteesRequest; + })(); + + v2beta1.RemoveGranteesRequest = (function() { + + /** + * Properties of a RemoveGranteesRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IRemoveGranteesRequest + * @property {string|null} [dataPolicy] RemoveGranteesRequest dataPolicy + * @property {Array.|null} [grantees] RemoveGranteesRequest grantees + */ + + /** + * Constructs a new RemoveGranteesRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a RemoveGranteesRequest. + * @implements IRemoveGranteesRequest + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest=} [properties] Properties to set + */ + function RemoveGranteesRequest(properties) { + this.grantees = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RemoveGranteesRequest dataPolicy. + * @member {string} dataPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @instance + */ + RemoveGranteesRequest.prototype.dataPolicy = ""; + + /** + * RemoveGranteesRequest grantees. + * @member {Array.} grantees + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @instance + */ + RemoveGranteesRequest.prototype.grantees = $util.emptyArray; + + /** + * Creates a new RemoveGranteesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest} RemoveGranteesRequest instance + */ + RemoveGranteesRequest.create = function create(properties) { + return new RemoveGranteesRequest(properties); + }; + + /** + * Encodes the specified RemoveGranteesRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest} message RemoveGranteesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveGranteesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPolicy != null && Object.hasOwnProperty.call(message, "dataPolicy")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataPolicy); + if (message.grantees != null && message.grantees.length) + for (var i = 0; i < message.grantees.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.grantees[i]); + return writer; + }; + + /** + * Encodes the specified RemoveGranteesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest} message RemoveGranteesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RemoveGranteesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RemoveGranteesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest} RemoveGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveGranteesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataPolicy = reader.string(); + break; + } + case 2: { + if (!(message.grantees && message.grantees.length)) + message.grantees = []; + message.grantees.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RemoveGranteesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest} RemoveGranteesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RemoveGranteesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RemoveGranteesRequest message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RemoveGranteesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) + if (!$util.isString(message.dataPolicy)) + return "dataPolicy: string expected"; + if (message.grantees != null && message.hasOwnProperty("grantees")) { + if (!Array.isArray(message.grantees)) + return "grantees: array expected"; + for (var i = 0; i < message.grantees.length; ++i) + if (!$util.isString(message.grantees[i])) + return "grantees: string[] expected"; + } + return null; + }; + + /** + * Creates a RemoveGranteesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest} RemoveGranteesRequest + */ + RemoveGranteesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest(); + if (object.dataPolicy != null) + message.dataPolicy = String(object.dataPolicy); + if (object.grantees) { + if (!Array.isArray(object.grantees)) + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest.grantees: array expected"); + message.grantees = []; + for (var i = 0; i < object.grantees.length; ++i) + message.grantees[i] = String(object.grantees[i]); + } + return message; + }; + + /** + * Creates a plain object from a RemoveGranteesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest} message RemoveGranteesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RemoveGranteesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.grantees = []; + if (options.defaults) + object.dataPolicy = ""; + if (message.dataPolicy != null && message.hasOwnProperty("dataPolicy")) + object.dataPolicy = message.dataPolicy; + if (message.grantees && message.grantees.length) { + object.grantees = []; + for (var j = 0; j < message.grantees.length; ++j) + object.grantees[j] = message.grantees[j]; + } + return object; + }; + + /** + * Converts this RemoveGranteesRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @instance + * @returns {Object.} JSON object + */ + RemoveGranteesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RemoveGranteesRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RemoveGranteesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest"; + }; + + return RemoveGranteesRequest; + })(); + + v2beta1.DeleteDataPolicyRequest = (function() { + + /** + * Properties of a DeleteDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IDeleteDataPolicyRequest + * @property {string|null} [name] DeleteDataPolicyRequest name + */ + + /** + * Constructs a new DeleteDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a DeleteDataPolicyRequest. + * @implements IDeleteDataPolicyRequest + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest=} [properties] Properties to set + */ + function DeleteDataPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataPolicyRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @instance + */ + DeleteDataPolicyRequest.prototype.name = ""; + + /** + * Creates a new DeleteDataPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest} DeleteDataPolicyRequest instance + */ + DeleteDataPolicyRequest.create = function create(properties) { + return new DeleteDataPolicyRequest(properties); + }; + + /** + * Encodes the specified DeleteDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest} message DeleteDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataPolicyRequest.encode = function encode(message, writer) { + 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 DeleteDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest} message DeleteDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest} DeleteDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest} DeleteDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataPolicyRequest message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataPolicyRequest.verify = function verify(message) { + if (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 DeleteDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest} DeleteDataPolicyRequest + */ + DeleteDataPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDataPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest} message DeleteDataPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataPolicyRequest.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 DeleteDataPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest"; + }; + + return DeleteDataPolicyRequest; + })(); + + v2beta1.GetDataPolicyRequest = (function() { + + /** + * Properties of a GetDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IGetDataPolicyRequest + * @property {string|null} [name] GetDataPolicyRequest name + */ + + /** + * Constructs a new GetDataPolicyRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a GetDataPolicyRequest. + * @implements IGetDataPolicyRequest + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest=} [properties] Properties to set + */ + function GetDataPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataPolicyRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @instance + */ + GetDataPolicyRequest.prototype.name = ""; + + /** + * Creates a new GetDataPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest} GetDataPolicyRequest instance + */ + GetDataPolicyRequest.create = function create(properties) { + return new GetDataPolicyRequest(properties); + }; + + /** + * Encodes the specified GetDataPolicyRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest} message GetDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataPolicyRequest.encode = function encode(message, writer) { + 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 GetDataPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest} message GetDataPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest} GetDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest} GetDataPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataPolicyRequest message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataPolicyRequest.verify = function verify(message) { + if (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 GetDataPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest} GetDataPolicyRequest + */ + GetDataPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest} message GetDataPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataPolicyRequest.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 GetDataPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest"; + }; + + return GetDataPolicyRequest; + })(); + + v2beta1.ListDataPoliciesRequest = (function() { + + /** + * Properties of a ListDataPoliciesRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IListDataPoliciesRequest + * @property {string|null} [parent] ListDataPoliciesRequest parent + * @property {number|null} [pageSize] ListDataPoliciesRequest pageSize + * @property {string|null} [pageToken] ListDataPoliciesRequest pageToken + */ + + /** + * Constructs a new ListDataPoliciesRequest. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a ListDataPoliciesRequest. + * @implements IListDataPoliciesRequest + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest=} [properties] Properties to set + */ + function ListDataPoliciesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataPoliciesRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @instance + */ + ListDataPoliciesRequest.prototype.parent = ""; + + /** + * ListDataPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @instance + */ + ListDataPoliciesRequest.prototype.pageSize = 0; + + /** + * ListDataPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @instance + */ + ListDataPoliciesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDataPoliciesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest} ListDataPoliciesRequest instance + */ + ListDataPoliciesRequest.create = function create(properties) { + return new ListDataPoliciesRequest(properties); + }; + + /** + * Encodes the specified ListDataPoliciesRequest message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest} message ListDataPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataPoliciesRequest.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 ListDataPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest} message ListDataPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataPoliciesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest} ListDataPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataPoliciesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataPoliciesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest} ListDataPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataPoliciesRequest message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataPoliciesRequest.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 ListDataPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest} ListDataPoliciesRequest + */ + ListDataPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest(); + 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 ListDataPoliciesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest} message ListDataPoliciesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataPoliciesRequest.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 ListDataPoliciesRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataPoliciesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataPoliciesRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest"; + }; + + return ListDataPoliciesRequest; + })(); + + v2beta1.ListDataPoliciesResponse = (function() { + + /** + * Properties of a ListDataPoliciesResponse. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IListDataPoliciesResponse + * @property {Array.|null} [dataPolicies] ListDataPoliciesResponse dataPolicies + * @property {string|null} [nextPageToken] ListDataPoliciesResponse nextPageToken + */ + + /** + * Constructs a new ListDataPoliciesResponse. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a ListDataPoliciesResponse. + * @implements IListDataPoliciesResponse + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse=} [properties] Properties to set + */ + function ListDataPoliciesResponse(properties) { + this.dataPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataPoliciesResponse dataPolicies. + * @member {Array.} dataPolicies + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @instance + */ + ListDataPoliciesResponse.prototype.dataPolicies = $util.emptyArray; + + /** + * ListDataPoliciesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @instance + */ + ListDataPoliciesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataPoliciesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse} ListDataPoliciesResponse instance + */ + ListDataPoliciesResponse.create = function create(properties) { + return new ListDataPoliciesResponse(properties); + }; + + /** + * Encodes the specified ListDataPoliciesResponse message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse} message ListDataPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataPoliciesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataPolicies != null && message.dataPolicies.length) + for (var i = 0; i < message.dataPolicies.length; ++i) + $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.encode(message.dataPolicies[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 ListDataPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse} message ListDataPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataPoliciesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse} ListDataPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataPoliciesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.dataPolicies && message.dataPolicies.length)) + message.dataPolicies = []; + message.dataPolicies.push($root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataPoliciesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse} ListDataPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataPoliciesResponse message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataPoliciesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataPolicies != null && message.hasOwnProperty("dataPolicies")) { + if (!Array.isArray(message.dataPolicies)) + return "dataPolicies: array expected"; + for (var i = 0; i < message.dataPolicies.length; ++i) { + var error = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.verify(message.dataPolicies[i]); + if (error) + return "dataPolicies." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse} ListDataPoliciesResponse + */ + ListDataPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse(); + if (object.dataPolicies) { + if (!Array.isArray(object.dataPolicies)) + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse.dataPolicies: array expected"); + message.dataPolicies = []; + for (var i = 0; i < object.dataPolicies.length; ++i) { + if (typeof object.dataPolicies[i] !== "object") + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse.dataPolicies: object expected"); + message.dataPolicies[i] = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.fromObject(object.dataPolicies[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataPoliciesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse} message ListDataPoliciesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataPoliciesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataPolicies = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataPolicies && message.dataPolicies.length) { + object.dataPolicies = []; + for (var j = 0; j < message.dataPolicies.length; ++j) + object.dataPolicies[j] = $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.toObject(message.dataPolicies[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataPoliciesResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataPoliciesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataPoliciesResponse + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse"; + }; + + return ListDataPoliciesResponse; + })(); + + v2beta1.DataPolicy = (function() { + + /** + * Properties of a DataPolicy. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IDataPolicy + * @property {google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy|null} [dataMaskingPolicy] DataPolicy dataMaskingPolicy + * @property {string|null} [name] DataPolicy name + * @property {string|null} [dataPolicyId] DataPolicy dataPolicyId + * @property {string|null} [etag] DataPolicy etag + * @property {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType|null} [dataPolicyType] DataPolicy dataPolicyType + * @property {string|null} [policyTag] DataPolicy policyTag + * @property {Array.|null} [grantees] DataPolicy grantees + * @property {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version|null} [version] DataPolicy version + */ + + /** + * Constructs a new DataPolicy. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a DataPolicy. + * @implements IDataPolicy + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy=} [properties] Properties to set + */ + function DataPolicy(properties) { + this.grantees = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataPolicy dataMaskingPolicy. + * @member {google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy|null|undefined} dataMaskingPolicy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.dataMaskingPolicy = null; + + /** + * DataPolicy name. + * @member {string} name + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.name = ""; + + /** + * DataPolicy dataPolicyId. + * @member {string} dataPolicyId + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.dataPolicyId = ""; + + /** + * DataPolicy etag. + * @member {string|null|undefined} etag + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.etag = null; + + /** + * DataPolicy dataPolicyType. + * @member {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType} dataPolicyType + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.dataPolicyType = 0; + + /** + * DataPolicy policyTag. + * @member {string} policyTag + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.policyTag = ""; + + /** + * DataPolicy grantees. + * @member {Array.} grantees + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.grantees = $util.emptyArray; + + /** + * DataPolicy version. + * @member {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version} version + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + DataPolicy.prototype.version = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataPolicy policy. + * @member {"dataMaskingPolicy"|undefined} policy + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + */ + Object.defineProperty(DataPolicy.prototype, "policy", { + get: $util.oneOfGetter($oneOfFields = ["dataMaskingPolicy"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DataPolicy.prototype, "_etag", { + get: $util.oneOfGetter($oneOfFields = ["etag"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} DataPolicy instance + */ + DataPolicy.create = function create(properties) { + return new DataPolicy(properties); + }; + + /** + * Encodes the specified DataPolicy message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy} message DataPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dataPolicyId != null && Object.hasOwnProperty.call(message, "dataPolicyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dataPolicyId); + if (message.dataPolicyType != null && Object.hasOwnProperty.call(message, "dataPolicyType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.dataPolicyType); + if (message.policyTag != null && Object.hasOwnProperty.call(message, "policyTag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.policyTag); + if (message.dataMaskingPolicy != null && Object.hasOwnProperty.call(message, "dataMaskingPolicy")) + $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.encode(message.dataMaskingPolicy, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.grantees != null && message.grantees.length) + for (var i = 0; i < message.grantees.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.grantees[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.version); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + return writer; + }; + + /** + * Encodes the specified DataPolicy message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy} message DataPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} DataPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 7: { + message.dataMaskingPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dataPolicyId = reader.string(); + break; + } + case 11: { + message.etag = reader.string(); + break; + } + case 3: { + message.dataPolicyType = reader.int32(); + break; + } + case 4: { + message.policyTag = reader.string(); + break; + } + case 8: { + if (!(message.grantees && message.grantees.length)) + message.grantees = []; + message.grantees.push(reader.string()); + break; + } + case 9: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} DataPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataPolicy message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.dataMaskingPolicy != null && message.hasOwnProperty("dataMaskingPolicy")) { + properties.policy = 1; + { + var error = $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.verify(message.dataMaskingPolicy); + if (error) + return "dataMaskingPolicy." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dataPolicyId != null && message.hasOwnProperty("dataPolicyId")) + if (!$util.isString(message.dataPolicyId)) + return "dataPolicyId: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) { + properties._etag = 1; + if (!$util.isString(message.etag)) + return "etag: string expected"; + } + if (message.dataPolicyType != null && message.hasOwnProperty("dataPolicyType")) + switch (message.dataPolicyType) { + default: + return "dataPolicyType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.policyTag != null && message.hasOwnProperty("policyTag")) + if (!$util.isString(message.policyTag)) + return "policyTag: string expected"; + if (message.grantees != null && message.hasOwnProperty("grantees")) { + if (!Array.isArray(message.grantees)) + return "grantees: array expected"; + for (var i = 0; i < message.grantees.length; ++i) + if (!$util.isString(message.grantees[i])) + return "grantees: string[] expected"; + } + if (message.version != null && message.hasOwnProperty("version")) + switch (message.version) { + default: + return "version: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DataPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} DataPolicy + */ + DataPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy(); + if (object.dataMaskingPolicy != null) { + if (typeof object.dataMaskingPolicy !== "object") + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.dataMaskingPolicy: object expected"); + message.dataMaskingPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.fromObject(object.dataMaskingPolicy); + } + if (object.name != null) + message.name = String(object.name); + if (object.dataPolicyId != null) + message.dataPolicyId = String(object.dataPolicyId); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.dataPolicyType) { + default: + if (typeof object.dataPolicyType === "number") { + message.dataPolicyType = object.dataPolicyType; + break; + } + break; + case "DATA_POLICY_TYPE_UNSPECIFIED": + case 0: + message.dataPolicyType = 0; + break; + case "DATA_MASKING_POLICY": + case 1: + message.dataPolicyType = 1; + break; + case "RAW_DATA_ACCESS_POLICY": + case 2: + message.dataPolicyType = 2; + break; + } + if (object.policyTag != null) + message.policyTag = String(object.policyTag); + if (object.grantees) { + if (!Array.isArray(object.grantees)) + throw TypeError(".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.grantees: array expected"); + message.grantees = []; + for (var i = 0; i < object.grantees.length; ++i) + message.grantees[i] = String(object.grantees[i]); + } + switch (object.version) { + default: + if (typeof object.version === "number") { + message.version = object.version; + break; + } + break; + case "VERSION_UNSPECIFIED": + case 0: + message.version = 0; + break; + case "V1": + case 1: + message.version = 1; + break; + case "V2": + case 2: + message.version = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} message DataPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.grantees = []; + if (options.defaults) { + object.name = ""; + object.dataPolicyId = ""; + object.dataPolicyType = options.enums === String ? "DATA_POLICY_TYPE_UNSPECIFIED" : 0; + object.policyTag = ""; + object.version = options.enums === String ? "VERSION_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dataPolicyId != null && message.hasOwnProperty("dataPolicyId")) + object.dataPolicyId = message.dataPolicyId; + if (message.dataPolicyType != null && message.hasOwnProperty("dataPolicyType")) + object.dataPolicyType = options.enums === String ? $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType[message.dataPolicyType] === undefined ? message.dataPolicyType : $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType[message.dataPolicyType] : message.dataPolicyType; + if (message.policyTag != null && message.hasOwnProperty("policyTag")) + object.policyTag = message.policyTag; + if (message.dataMaskingPolicy != null && message.hasOwnProperty("dataMaskingPolicy")) { + object.dataMaskingPolicy = $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.toObject(message.dataMaskingPolicy, options); + if (options.oneofs) + object.policy = "dataMaskingPolicy"; + } + if (message.grantees && message.grantees.length) { + object.grantees = []; + for (var j = 0; j < message.grantees.length; ++j) + object.grantees[j] = message.grantees[j]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = options.enums === String ? $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version[message.version] === undefined ? message.version : $root.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version[message.version] : message.version; + if (message.etag != null && message.hasOwnProperty("etag")) { + object.etag = message.etag; + if (options.oneofs) + object._etag = "etag"; + } + return object; + }; + + /** + * Converts this DataPolicy to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @instance + * @returns {Object.} JSON object + */ + DataPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataPolicy + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.DataPolicy"; + }; + + /** + * DataPolicyType enum. + * @name google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.DataPolicyType + * @enum {number} + * @property {number} DATA_POLICY_TYPE_UNSPECIFIED=0 DATA_POLICY_TYPE_UNSPECIFIED value + * @property {number} DATA_MASKING_POLICY=1 DATA_MASKING_POLICY value + * @property {number} RAW_DATA_ACCESS_POLICY=2 RAW_DATA_ACCESS_POLICY value + */ + DataPolicy.DataPolicyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_POLICY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATA_MASKING_POLICY"] = 1; + values[valuesById[2] = "RAW_DATA_ACCESS_POLICY"] = 2; + return values; + })(); + + /** + * Version enum. + * @name google.cloud.bigquery.datapolicies.v2beta1.DataPolicy.Version + * @enum {number} + * @property {number} VERSION_UNSPECIFIED=0 VERSION_UNSPECIFIED value + * @property {number} V1=1 V1 value + * @property {number} V2=2 V2 value + */ + DataPolicy.Version = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VERSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "V1"] = 1; + values[valuesById[2] = "V2"] = 2; + return values; + })(); + + return DataPolicy; + })(); + + v2beta1.DataMaskingPolicy = (function() { + + /** + * Properties of a DataMaskingPolicy. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @interface IDataMaskingPolicy + * @property {google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression|null} [predefinedExpression] DataMaskingPolicy predefinedExpression + */ + + /** + * Constructs a new DataMaskingPolicy. + * @memberof google.cloud.bigquery.datapolicies.v2beta1 + * @classdesc Represents a DataMaskingPolicy. + * @implements IDataMaskingPolicy + * @constructor + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy=} [properties] Properties to set + */ + function DataMaskingPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataMaskingPolicy predefinedExpression. + * @member {google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression|null|undefined} predefinedExpression + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @instance + */ + DataMaskingPolicy.prototype.predefinedExpression = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataMaskingPolicy maskingExpression. + * @member {"predefinedExpression"|undefined} maskingExpression + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @instance + */ + Object.defineProperty(DataMaskingPolicy.prototype, "maskingExpression", { + get: $util.oneOfGetter($oneOfFields = ["predefinedExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataMaskingPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy=} [properties] Properties to set + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy} DataMaskingPolicy instance + */ + DataMaskingPolicy.create = function create(properties) { + return new DataMaskingPolicy(properties); + }; + + /** + * Encodes the specified DataMaskingPolicy message. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy} message DataMaskingPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMaskingPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.predefinedExpression != null && Object.hasOwnProperty.call(message, "predefinedExpression")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.predefinedExpression); + return writer; + }; + + /** + * Encodes the specified DataMaskingPolicy message, length delimited. Does not implicitly {@link google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.IDataMaskingPolicy} message DataMaskingPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataMaskingPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataMaskingPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy} DataMaskingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMaskingPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.predefinedExpression = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataMaskingPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy} DataMaskingPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataMaskingPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataMaskingPolicy message. + * @function verify + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataMaskingPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.predefinedExpression != null && message.hasOwnProperty("predefinedExpression")) { + properties.maskingExpression = 1; + switch (message.predefinedExpression) { + default: + return "predefinedExpression: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a DataMaskingPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy} DataMaskingPolicy + */ + DataMaskingPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy) + return object; + var message = new $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy(); + switch (object.predefinedExpression) { + default: + if (typeof object.predefinedExpression === "number") { + message.predefinedExpression = object.predefinedExpression; + break; + } + break; + case "PREDEFINED_EXPRESSION_UNSPECIFIED": + case 0: + message.predefinedExpression = 0; + break; + case "SHA256": + case 1: + message.predefinedExpression = 1; + break; + case "ALWAYS_NULL": + case 2: + message.predefinedExpression = 2; + break; + case "DEFAULT_MASKING_VALUE": + case 3: + message.predefinedExpression = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataMaskingPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy} message DataMaskingPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataMaskingPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.predefinedExpression != null && message.hasOwnProperty("predefinedExpression")) { + object.predefinedExpression = options.enums === String ? $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression[message.predefinedExpression] === undefined ? message.predefinedExpression : $root.google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression[message.predefinedExpression] : message.predefinedExpression; + if (options.oneofs) + object.maskingExpression = "predefinedExpression"; + } + return object; + }; + + /** + * Converts this DataMaskingPolicy to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @instance + * @returns {Object.} JSON object + */ + DataMaskingPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataMaskingPolicy + * @function getTypeUrl + * @memberof google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataMaskingPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy"; + }; + + /** + * PredefinedExpression enum. + * @name google.cloud.bigquery.datapolicies.v2beta1.DataMaskingPolicy.PredefinedExpression + * @enum {number} + * @property {number} PREDEFINED_EXPRESSION_UNSPECIFIED=0 PREDEFINED_EXPRESSION_UNSPECIFIED value + * @property {number} SHA256=1 SHA256 value + * @property {number} ALWAYS_NULL=2 ALWAYS_NULL value + * @property {number} DEFAULT_MASKING_VALUE=3 DEFAULT_MASKING_VALUE value + */ + DataMaskingPolicy.PredefinedExpression = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PREDEFINED_EXPRESSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SHA256"] = 1; + values[valuesById[2] = "ALWAYS_NULL"] = 2; + values[valuesById[3] = "DEFAULT_MASKING_VALUE"] = 3; + return values; + })(); + + return DataMaskingPolicy; + })(); + + return v2beta1; + })(); + + return datapolicies; + })(); + + return bigquery; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; @@ -6091,6 +9135,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -6125,6 +9170,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -6157,6 +9210,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -6208,6 +9263,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6259,6 +9318,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -6301,6 +9365,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -6319,8 +9388,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -6328,6 +9399,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -8150,6 +11223,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -8175,6 +11249,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -8201,6 +11283,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -8241,6 +11325,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8281,6 +11369,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -8301,6 +11394,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -8317,38 +11415,294 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, 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); - }; + /** + * 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"; + }; + + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; - /** - * 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 ExperimentalFeatures; + })(); return PythonSettings; })(); @@ -9226,6 +12580,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -9237,6 +12592,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9251,6 +12607,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -9277,6 +12641,9 @@ 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(); return writer; }; @@ -9307,7 +12674,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -9317,6 +12684,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -9357,6 +12747,14 @@ 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"; + } return null; }; @@ -9377,6 +12775,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -9393,10 +12798,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -9990,49 +13403,294 @@ return LongRunning; })(); - return MethodSettings; - })(); + 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; + })(); + + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - })(); + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; - /** - * 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; + return SelectiveGapicGeneration; })(); /** @@ -11020,6 +14678,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -11034,6 +14693,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -11058,6 +14718,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -11080,6 +14741,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -11130,6 +14792,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -11251,6 +14921,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -11323,6 +14996,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -11425,6 +15104,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -11479,6 +15165,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -11531,6 +15218,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -11594,6 +15288,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -11659,6 +15357,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -11715,6 +15414,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -11763,6 +15467,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -11868,6 +15573,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -11920,6 +15633,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -12012,6 +15727,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -12125,6 +15844,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -12224,6 +15952,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -12253,6 +16001,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -12298,6 +16047,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -14342,6 +18093,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -14402,6 +18154,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -14439,6 +18199,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -14501,6 +18263,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -14569,6 +18335,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -14618,6 +18393,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -14642,6 +18437,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -14662,6 +18458,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -16980,6 +20778,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -17100,6 +20899,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -17174,6 +20981,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -17199,672 +21008,989 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.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 {$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 + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + 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; - 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(); + } + 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; } - case 15: { - message.unverifiedLazy = reader.bool(); + } + 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.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + 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; } - case 3: { - message.deprecated = reader.bool(); + } + 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 10: { - message.weak = reader.bool(); + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; break; - } - case 16: { - message.debugRedact = reader.bool(); + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; break; - } - case 17: { - message.retention = reader.int32(); + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; 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()); + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; 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()); + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; 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 (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 (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 (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.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + 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 (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]) { + } + 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: - return "targets: enum value[] expected"; + 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: - case 9: + message[".google.api.fieldBehavior"][i] = 8; 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 (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.featureSupport = null; + object[".google.api.resourceReference"] = null; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; + 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.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.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[".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.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, 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.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; + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } - return null; + 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; }; /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject + * 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 {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - 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; + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - 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; + 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]]; } - 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]; + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); break; } - case "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]; + case 2: { + message.value = reader.string(); 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; + default: + reader.skipType(tag & 7); break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; + } + } + 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 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: 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); - }; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; - /** - * 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"; - }; + /** + * 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_LEGACY": + case 900: + message.edition = 900; + 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; + }; - /** - * 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; - })(); + /** + * 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; + }; - /** - * 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; - })(); + /** + * 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); + }; - /** - * 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; - })(); + /** + * 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"; + }; - /** - * 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; + return EditionDefault; })(); - FieldOptions.EditionDefault = (function() { + FieldOptions.FeatureSupport = (function() { /** - * Properties of an EditionDefault. + * Properties of a FeatureSupport. * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved */ /** - * Constructs a new EditionDefault. + * Constructs a new FeatureSupport. * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set */ - function EditionDefault(properties) { + function FeatureSupport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17872,91 +21998,119 @@ } /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance */ - EditionDefault.prototype.edition = 0; + FeatureSupport.prototype.editionIntroduced = 0; /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance */ - EditionDefault.prototype.value = ""; + FeatureSupport.prototype.editionDeprecated = 0; /** - * Creates a new EditionDefault instance using the specified properties. + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); }; /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encode = function encode(message, writer) { + FeatureSupport.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); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); return writer; }; /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EditionDefault message from the specified reader or buffer. + * Decodes a FeatureSupport message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @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 + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EditionDefault.decode = function decode(reader, length, error) { + FeatureSupport.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); + case 1: { + message.editionIntroduced = reader.int32(); break; } case 2: { - message.value = reader.string(); + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); break; } default: @@ -17968,37 +22122,77 @@ }; /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport * @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) { + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EditionDefault message. + * Verifies a FeatureSupport message. * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @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) { + FeatureSupport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { default: - return "edition: enum value expected"; + return "editionIntroduced: enum value expected"; case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: case 998: case 999: case 1000: @@ -18011,132 +22205,251 @@ 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. + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { default: - if (typeof object.edition === "number") { - message.edition = object.edition; + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; break; } break; case "EDITION_UNKNOWN": case 0: - message.edition = 0; + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; break; case "EDITION_PROTO2": case 998: - message.edition = 998; + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; break; case "EDITION_PROTO3": case 999: - message.edition = 999; + message.editionRemoved = 999; break; case "EDITION_2023": case 1000: - message.edition = 1000; + message.editionRemoved = 1000; break; case "EDITION_2024": case 1001: - message.edition = 1001; + message.editionRemoved = 1001; break; case "EDITION_1_TEST_ONLY": case 1: - message.edition = 1; + message.editionRemoved = 1; break; case "EDITION_2_TEST_ONLY": case 2: - message.edition = 2; + message.editionRemoved = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: - message.edition = 99997; + message.editionRemoved = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: - message.edition = 99998; + message.editionRemoved = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: - message.edition = 99999; + message.editionRemoved = 99999; break; case "EDITION_MAX": case 2147483647: - message.edition = 2147483647; + message.editionRemoved = 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. + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + FeatureSupport.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; + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; /** - * Converts this EditionDefault to JSON. + * Converts this FeatureSupport to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance * @returns {Object.} JSON object */ - EditionDefault.prototype.toJSON = function toJSON() { + FeatureSupport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EditionDefault + * Gets the default type url for FeatureSupport * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; }; - return EditionDefault; + return FeatureSupport; })(); return FieldOptions; @@ -18731,6 +23044,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -18774,6 +23088,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -18812,6 +23134,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -18863,6 +23187,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -18915,6 +23243,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -18948,6 +23281,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -18980,6 +23318,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -18987,6 +23326,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -20426,6 +24767,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -20491,6 +24834,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -20527,6 +24886,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -20587,6 +24950,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -20677,6 +25048,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -20816,6 +25207,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -20839,6 +25278,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -20852,6 +25293,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -20979,6 +25424,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -21163,6 +25821,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -21180,6 +25839,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -21228,6 +25888,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -21280,6 +25944,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -21388,7 +26056,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -21415,12 +26084,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -21446,10 +26123,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -21490,8 +26169,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -21534,6 +26217,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -21546,10 +26230,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -21577,6 +26266,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -21618,10 +26311,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -21640,13 +26338,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -22861,6 +27562,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Duration = (function() { /** diff --git a/packages/google-cloud-bigquery-datapolicies/protos/protos.json b/packages/google-cloud-bigquery-datapolicies/protos/protos.json index d5e65634638e..68851fbea3d1 100644 --- a/packages/google-cloud-bigquery-datapolicies/protos/protos.json +++ b/packages/google-cloud-bigquery-datapolicies/protos/protos.json @@ -720,6 +720,482 @@ } } } + }, + "v2beta1": { + "options": { + "csharp_namespace": "Google.Cloud.BigQuery.DataPolicies.V2Beta1", + "go_package": "cloud.google.com/go/bigquery/datapolicies/apiv2beta1/datapoliciespb;datapoliciespb", + "java_multiple_files": true, + "java_outer_classname": "DataPolicyProto", + "java_package": "com.google.cloud.bigquery.datapolicies.v2beta1", + "php_namespace": "Google\\Cloud\\BigQuery\\DataPolicies\\V2beta1", + "ruby_package": "Google::Cloud::Bigquery::DataPolicies::V2beta1", + "(google.api.resource_definition).type": "datacatalog.googleapis.com/PolicyTag", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" + }, + "nested": { + "DataPolicyService": { + "options": { + "(google.api.default_host)": "bigquerydatapolicy.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/bigquery,https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateDataPolicy": { + "requestType": "CreateDataPolicyRequest", + "responseType": "DataPolicy", + "options": { + "(google.api.http).post": "/v2beta1/{parent=projects/*/locations/*}/dataPolicies", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,data_policy,data_policy_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{parent=projects/*/locations/*}/dataPolicies", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,data_policy,data_policy_id" + } + ] + }, + "AddGrantees": { + "requestType": "AddGranteesRequest", + "responseType": "DataPolicy", + "options": { + "(google.api.http).post": "/v2beta1/{data_policy=projects/*/locations/*/dataPolicies/*}:addGrantees", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_policy,grantees" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{data_policy=projects/*/locations/*/dataPolicies/*}:addGrantees", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_policy,grantees" + } + ] + }, + "RemoveGrantees": { + "requestType": "RemoveGranteesRequest", + "responseType": "DataPolicy", + "options": { + "(google.api.http).post": "/v2beta1/{data_policy=projects/*/locations/*/dataPolicies/*}:removeGrantees", + "(google.api.http).body": "*", + "(google.api.method_signature)": "data_policy,grantees" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{data_policy=projects/*/locations/*/dataPolicies/*}:removeGrantees", + "body": "*" + } + }, + { + "(google.api.method_signature)": "data_policy,grantees" + } + ] + }, + "UpdateDataPolicy": { + "requestType": "UpdateDataPolicyRequest", + "responseType": "DataPolicy", + "options": { + "(google.api.http).patch": "/v2beta1/{data_policy.name=projects/*/locations/*/dataPolicies/*}", + "(google.api.http).body": "data_policy", + "(google.api.method_signature)": "data_policy,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2beta1/{data_policy.name=projects/*/locations/*/dataPolicies/*}", + "body": "data_policy" + } + }, + { + "(google.api.method_signature)": "data_policy,update_mask" + } + ] + }, + "DeleteDataPolicy": { + "requestType": "DeleteDataPolicyRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2beta1/{name=projects/*/locations/*/dataPolicies/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2beta1/{name=projects/*/locations/*/dataPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetDataPolicy": { + "requestType": "GetDataPolicyRequest", + "responseType": "DataPolicy", + "options": { + "(google.api.http).get": "/v2beta1/{name=projects/*/locations/*/dataPolicies/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2beta1/{name=projects/*/locations/*/dataPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDataPolicies": { + "requestType": "ListDataPoliciesRequest", + "responseType": "ListDataPoliciesResponse", + "options": { + "(google.api.http).get": "/v2beta1/{parent=projects/*/locations/*}/dataPolicies", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2beta1/{parent=projects/*/locations/*}/dataPolicies" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:getIamPolicy", + "body": "*" + } + } + ] + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:setIamPolicy", + "body": "*" + } + } + ] + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2beta1/{resource=projects/*/locations/*/dataPolicies/*}:testIamPermissions", + "body": "*" + } + } + ] + } + } + }, + "CreateDataPolicyRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigquerydatapolicy.googleapis.com/DataPolicy" + } + }, + "dataPolicyId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "dataPolicy": { + "type": "DataPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateDataPolicyRequest": { + "fields": { + "dataPolicy": { + "type": "DataPolicy", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AddGranteesRequest": { + "fields": { + "dataPolicy": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatapolicy.googleapis.com/DataPolicy" + } + }, + "grantees": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RemoveGranteesRequest": { + "fields": { + "dataPolicy": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatapolicy.googleapis.com/DataPolicy" + } + }, + "grantees": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDataPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatapolicy.googleapis.com/DataPolicy" + } + } + } + }, + "GetDataPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerydatapolicy.googleapis.com/DataPolicy" + } + } + } + }, + "ListDataPoliciesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "bigquerydatapolicy.googleapis.com/DataPolicy" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListDataPoliciesResponse": { + "fields": { + "dataPolicies": { + "rule": "repeated", + "type": "DataPolicy", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DataPolicy": { + "options": { + "(google.api.resource).type": "bigquerydatapolicy.googleapis.com/DataPolicy", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dataPolicies/{data_policy}", + "(google.api.resource).plural": "dataPolicies", + "(google.api.resource).singular": "dataPolicy" + }, + "oneofs": { + "policy": { + "oneof": [ + "dataMaskingPolicy" + ] + }, + "_etag": { + "oneof": [ + "etag" + ] + } + }, + "fields": { + "dataMaskingPolicy": { + "type": "DataMaskingPolicy", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "dataPolicyId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "etag": { + "type": "string", + "id": 11, + "options": { + "proto3_optional": true + } + }, + "dataPolicyType": { + "type": "DataPolicyType", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "policyTag": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "datacatalog.googleapis.com/PolicyTag" + } + }, + "grantees": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "version": { + "type": "Version", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "DataPolicyType": { + "values": { + "DATA_POLICY_TYPE_UNSPECIFIED": 0, + "DATA_MASKING_POLICY": 1, + "RAW_DATA_ACCESS_POLICY": 2 + } + }, + "Version": { + "values": { + "VERSION_UNSPECIFIED": 0, + "V1": 1, + "V2": 2 + } + } + } + }, + "DataMaskingPolicy": { + "oneofs": { + "maskingExpression": { + "oneof": [ + "predefinedExpression" + ] + } + }, + "fields": { + "predefinedExpression": { + "type": "PredefinedExpression", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PredefinedExpression": { + "values": { + "PREDEFINED_EXPRESSION_UNSPECIFIED": 0, + "SHA256": 1, + "ALWAYS_NULL": 2, + "DEFAULT_MASKING_VALUE": 3 + } + } + } + } + } } } } @@ -733,8 +1209,7 @@ "java_multiple_files": true, "java_outer_classname": "ResourceProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "http": { @@ -858,6 +1333,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -998,6 +1477,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -1055,6 +1556,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -1116,6 +1622,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -1248,12 +1767,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -1292,6 +1818,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -1380,6 +1911,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -1605,6 +2140,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -1819,6 +2358,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -1954,7 +2494,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -1982,6 +2523,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -2051,6 +2596,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -2139,6 +2704,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -2281,6 +2850,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -2291,6 +2861,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -2301,6 +2872,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -2311,6 +2883,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -2321,7 +2894,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -2331,27 +2905,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -2396,7 +2981,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -2411,6 +3002,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -2438,11 +3056,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -2455,6 +3088,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -2540,6 +3179,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Duration": { "fields": { "seconds": { @@ -2570,13 +3217,13 @@ "nested": { "v1": { "options": { - "cc_enable_arenas": true, "csharp_namespace": "Google.Cloud.Iam.V1", "go_package": "cloud.google.com/go/iam/apiv1/iampb;iampb", "java_multiple_files": true, "java_outer_classname": "PolicyProto", "java_package": "com.google.iam.v1", - "php_namespace": "Google\\Cloud\\Iam\\V1" + "php_namespace": "Google\\Cloud\\Iam\\V1", + "cc_enable_arenas": true }, "nested": { "IAMPolicy": { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/README.md b/packages/google-cloud-bigquery-datapolicies/samples/README.md index 318a488a24b7..1848c7e43ca4 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/README.md +++ b/packages/google-cloud-bigquery-datapolicies/samples/README.md @@ -29,6 +29,16 @@ * [Data_policy_service.set_iam_policy](#data_policy_service.set_iam_policy) * [Data_policy_service.test_iam_permissions](#data_policy_service.test_iam_permissions) * [Data_policy_service.update_data_policy](#data_policy_service.update_data_policy) + * [Data_policy_service.add_grantees](#data_policy_service.add_grantees) + * [Data_policy_service.create_data_policy](#data_policy_service.create_data_policy) + * [Data_policy_service.delete_data_policy](#data_policy_service.delete_data_policy) + * [Data_policy_service.get_data_policy](#data_policy_service.get_data_policy) + * [Data_policy_service.get_iam_policy](#data_policy_service.get_iam_policy) + * [Data_policy_service.list_data_policies](#data_policy_service.list_data_policies) + * [Data_policy_service.remove_grantees](#data_policy_service.remove_grantees) + * [Data_policy_service.set_iam_policy](#data_policy_service.set_iam_policy) + * [Data_policy_service.test_iam_permissions](#data_policy_service.test_iam_permissions) + * [Data_policy_service.update_data_policy](#data_policy_service.update_data_policy) * [Quickstart](#quickstart) ## Before you begin @@ -335,6 +345,176 @@ __Usage:__ +### Data_policy_service.add_grantees + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js` + + +----- + + + + +### Data_policy_service.create_data_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js` + + +----- + + + + +### Data_policy_service.delete_data_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js` + + +----- + + + + +### Data_policy_service.get_data_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js` + + +----- + + + + +### Data_policy_service.get_iam_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js` + + +----- + + + + +### Data_policy_service.list_data_policies + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js` + + +----- + + + + +### Data_policy_service.remove_grantees + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js` + + +----- + + + + +### Data_policy_service.set_iam_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js` + + +----- + + + + +### Data_policy_service.test_iam_permissions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js` + + +----- + + + + +### Data_policy_service.update_data_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js` + + +----- + + + + ### Quickstart View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-datapolicies/samples/quickstart.js). diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json index c12cd0786994..2ddd3721314c 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datapolicies.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.1.0", + "version": "2.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json index 2a8a7dfdb053..f6b304c211fa 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datapolicies.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.1.0", + "version": "2.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json index 55348c0a5b59..70149ff7d0f1 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata.google.cloud.bigquery.datapolicies.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.1.0", + "version": "2.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json index 55348c0a5b59..70149ff7d0f1 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v1beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datapolicies", - "version": "2.1.0", + "version": "2.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js new file mode 100644 index 000000000000..e40117b0bb54 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.add_grantees.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(dataPolicy, grantees) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_AddGrantees_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + */ + // const dataPolicy = 'abc123' + /** + * Required. IAM principal that should be granted Fine Grained Access to the + * underlying data goverened by the data policy. The target data policy is + * determined by the `data_policy` field. + * Uses the IAM V2 principal + * syntax (https://cloud.google.com/iam/docs/principal-identifiers#v2). + * Supported principal types: + * * User + * * Group + * * Service account + */ + // const grantees = ['abc','def'] + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callAddGrantees() { + // Construct request + const request = { + dataPolicy, + grantees, + }; + + // Run request + const response = await datapoliciesClient.addGrantees(request); + console.log(response); + } + + callAddGrantees(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_AddGrantees_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js new file mode 100644 index 000000000000..f927f7b237ba --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.create_data_policy.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, dataPolicyId, dataPolicy) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_CreateDataPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Required. User-assigned (human readable) ID of the data policy that needs + * to be unique within a project. Used as {data_policy_id} in part of the + * resource name. + */ + // const dataPolicyId = 'abc123' + /** + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + */ + // const dataPolicy = {} + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callCreateDataPolicy() { + // Construct request + const request = { + parent, + dataPolicyId, + dataPolicy, + }; + + // Run request + const response = await datapoliciesClient.createDataPolicy(request); + console.log(response); + } + + callCreateDataPolicy(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_CreateDataPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js new file mode 100644 index 000000000000..cecb4487eed5 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.delete_data_policy.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_DeleteDataPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`. + */ + // const name = 'abc123' + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callDeleteDataPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datapoliciesClient.deleteDataPolicy(request); + console.log(response); + } + + callDeleteDataPolicy(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_DeleteDataPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js new file mode 100644 index 000000000000..d51c3b018a2e --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_data_policy.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetDataPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{id}`. + */ + // const name = 'abc123' + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callGetDataPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await datapoliciesClient.getDataPolicy(request); + console.log(response); + } + + callGetDataPolicy(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetDataPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js new file mode 100644 index 000000000000..c8a489827c52 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.get_iam_policy.js @@ -0,0 +1,67 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + */ + // const options = {} + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callGetIamPolicy() { + // Construct request + const request = { + resource, + }; + + // Run request + const response = await datapoliciesClient.getIamPolicy(request); + console.log(response); + } + + callGetIamPolicy(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js new file mode 100644 index 000000000000..2d23c094e338 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.list_data_policies.js @@ -0,0 +1,74 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 bigquerydatapolicy_v2beta1_generated_DataPolicyService_ListDataPolicies_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of data policies to return. Must be a value + * between 1 and 1000. If not set, defaults to 50. + */ + // const pageSize = 1234 + /** + * Optional. The `nextPageToken` value returned from a previous list request, + * if any. If not set, defaults to an empty string. + */ + // const pageToken = 'abc123' + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callListDataPolicies() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = datapoliciesClient.listDataPoliciesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataPolicies(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_ListDataPolicies_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js new file mode 100644 index 000000000000..222df862fa94 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.remove_grantees.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(dataPolicy, grantees) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_RemoveGrantees_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + */ + // const dataPolicy = 'abc123' + /** + * Required. IAM principal that should be revoked from Fine Grained Access to + * the underlying data goverened by the data policy. The target data policy is + * determined by the `data_policy` field. + * Uses the IAM V2 principal + * syntax (https://cloud.google.com/iam/docs/principal-identifiers#v2). + * Supported principal types: + * * User + * * Group + * * Service account + */ + // const grantees = ['abc','def'] + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callRemoveGrantees() { + // Construct request + const request = { + dataPolicy, + grantees, + }; + + // Run request + const response = await datapoliciesClient.removeGrantees(request); + console.log(response); + } + + callRemoveGrantees(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_RemoveGrantees_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js new file mode 100644 index 000000000000..83026dc27870 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.set_iam_policy.js @@ -0,0 +1,77 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, policy) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_SetIamPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + */ + // const policy = {} + /** + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * `paths: "bindings, etag"` + */ + // const updateMask = {} + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callSetIamPolicy() { + // Construct request + const request = { + resource, + policy, + }; + + // Run request + const response = await datapoliciesClient.setIamPolicy(request); + console.log(response); + } + + callSetIamPolicy(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_SetIamPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js new file mode 100644 index 000000000000..e8e3a7900dd6 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.test_iam_permissions.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(resource, permissions) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_TestIamPermissions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + */ + // const resource = 'abc123' + /** + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * IAM Overview (https://cloud.google.com/iam/docs/overview#permissions). + */ + // const permissions = ['abc','def'] + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callTestIamPermissions() { + // Construct request + const request = { + resource, + permissions, + }; + + // Run request + const response = await datapoliciesClient.testIamPermissions(request); + console.log(response); + } + + callTestIamPermissions(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_TestIamPermissions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js new file mode 100644 index 000000000000..d4a323d2cd3c --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/data_policy_service.update_data_policy.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(dataPolicy) { + // [START bigquerydatapolicy_v2beta1_generated_DataPolicyService_UpdateDataPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Update the data policy's metadata. + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + */ + // const dataPolicy = {} + /** + * Optional. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * Updates to the `name` and `dataPolicyId` fields are not allowed. + */ + // const updateMask = {} + + // Imports the Datapolicies library + const {DataPolicyServiceClient} = require('@google-cloud/datapolicies').v2beta1; + + // Instantiates a client + const datapoliciesClient = new DataPolicyServiceClient(); + + async function callUpdateDataPolicy() { + // Construct request + const request = { + dataPolicy, + }; + + // Run request + const response = await datapoliciesClient.updateDataPolicy(request); + console.log(response); + } + + callUpdateDataPolicy(); + // [END bigquerydatapolicy_v2beta1_generated_DataPolicyService_UpdateDataPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v2beta1.json b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v2beta1.json new file mode 100644 index 000000000000..d1ec03b15baa --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/samples/generated/v2beta1/snippet_metadata_google.cloud.bigquery.datapolicies.v2beta1.json @@ -0,0 +1,459 @@ +{ + "clientLibrary": { + "name": "nodejs-datapolicies", + "version": "2.2.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.bigquery.datapolicies.v2beta1", + "version": "v2beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_CreateDataPolicy_async", + "title": "DataPolicyService createDataPolicy Sample", + "origin": "API_DEFINITION", + "description": " Creates a new data policy under a project with the given `data_policy_id` (used as the display name), and data policy type.", + "canonical": true, + "file": "data_policy_service.create_data_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.CreateDataPolicy", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_policy_id", + "type": "TYPE_STRING" + }, + { + "name": "data_policy", + "type": ".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy" + } + ], + "resultType": ".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "CreateDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.CreateDataPolicy", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_AddGrantees_async", + "title": "DataPolicyService addGrantees Sample", + "origin": "API_DEFINITION", + "description": " Adds new grantees to a data policy. The new grantees will be added to the existing grantees. If the request contains a duplicate grantee, the grantee will be ignored. If the request contains a grantee that already exists, the grantee will be ignored.", + "canonical": true, + "file": "data_policy_service.add_grantees.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AddGrantees", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.AddGrantees", + "async": true, + "parameters": [ + { + "name": "data_policy", + "type": "TYPE_STRING" + }, + { + "name": "grantees", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "AddGrantees", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.AddGrantees", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_RemoveGrantees_async", + "title": "DataPolicyService removeGrantees Sample", + "origin": "API_DEFINITION", + "description": " Removes grantees from a data policy. The grantees will be removed from the existing grantees. If the request contains a grantee that does not exist, the grantee will be ignored.", + "canonical": true, + "file": "data_policy_service.remove_grantees.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveGrantees", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.RemoveGrantees", + "async": true, + "parameters": [ + { + "name": "data_policy", + "type": "TYPE_STRING" + }, + { + "name": "grantees", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "RemoveGrantees", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.RemoveGrantees", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_UpdateDataPolicy_async", + "title": "DataPolicyService updateDataPolicy Sample", + "origin": "API_DEFINITION", + "description": " Updates the metadata for an existing data policy. The target data policy can be specified by the resource name.", + "canonical": true, + "file": "data_policy_service.update_data_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.UpdateDataPolicy", + "async": true, + "parameters": [ + { + "name": "data_policy", + "type": ".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "UpdateDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.UpdateDataPolicy", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_DeleteDataPolicy_async", + "title": "DataPolicyService deleteDataPolicy Sample", + "origin": "API_DEFINITION", + "description": " Deletes the data policy specified by its resource name.", + "canonical": true, + "file": "data_policy_service.delete_data_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.DeleteDataPolicy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "DeleteDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.DeleteDataPolicy", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetDataPolicy_async", + "title": "DataPolicyService getDataPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the data policy specified by its resource name.", + "canonical": true, + "file": "data_policy_service.get_data_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetDataPolicy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.bigquery.datapolicies.v2beta1.DataPolicy", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "GetDataPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetDataPolicy", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_ListDataPolicies_async", + "title": "DataPolicyService listDataPolicies Sample", + "origin": "API_DEFINITION", + "description": " List all of the data policies in the specified parent project.", + "canonical": true, + "file": "data_policy_service.list_data_policies.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataPolicies", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.ListDataPolicies", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesResponse", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "ListDataPolicies", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.ListDataPolicies", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetIamPolicy_async", + "title": "DataPolicyService getIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets the IAM policy for the specified data policy.", + "canonical": true, + "file": "data_policy_service.get_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "options", + "type": ".google.iam.v1.GetPolicyOptions" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "GetIamPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.GetIamPolicy", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_SetIamPolicy_async", + "title": "DataPolicyService setIamPolicy Sample", + "origin": "API_DEFINITION", + "description": " Sets the IAM policy for the specified data policy.", + "canonical": true, + "file": "data_policy_service.set_iam_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.SetIamPolicy", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "policy", + "type": ".google.iam.v1.Policy" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.iam.v1.Policy", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "SetIamPolicy", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.SetIamPolicy", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + }, + { + "regionTag": "bigquerydatapolicy_v2beta1_generated_DataPolicyService_TestIamPermissions_async", + "title": "DataPolicyService testIamPermissions Sample", + "origin": "API_DEFINITION", + "description": " Returns the caller's permission on the specified data policy resource.", + "canonical": true, + "file": "data_policy_service.test_iam_permissions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.TestIamPermissions", + "async": true, + "parameters": [ + { + "name": "resource", + "type": "TYPE_STRING" + }, + { + "name": "permissions", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.iam.v1.TestIamPermissionsResponse", + "client": { + "shortName": "DataPolicyServiceClient", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyServiceClient" + }, + "method": { + "shortName": "TestIamPermissions", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService.TestIamPermissions", + "service": { + "shortName": "DataPolicyService", + "fullName": "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-datapolicies/samples/package.json b/packages/google-cloud-bigquery-datapolicies/samples/package.json index c1f204a873db..8714896e4c35 100644 --- a/packages/google-cloud-bigquery-datapolicies/samples/package.json +++ b/packages/google-cloud-bigquery-datapolicies/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/bigquery-datapolicies": "^2.1.0" + "@google-cloud/bigquery-datapolicies": "^2.2.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-bigquery-datapolicies/src/index.ts b/packages/google-cloud-bigquery-datapolicies/src/index.ts index 8f8ce8b10752..4bb928cdcdd4 100644 --- a/packages/google-cloud-bigquery-datapolicies/src/index.ts +++ b/packages/google-cloud-bigquery-datapolicies/src/index.ts @@ -18,11 +18,12 @@ import * as v1 from './v1'; import * as v1beta1 from './v1beta1'; +import * as v2beta1 from './v2beta1'; const DataPolicyServiceClient = v1beta1.DataPolicyServiceClient; type DataPolicyServiceClient = v1beta1.DataPolicyServiceClient; -export {v1, v1beta1, DataPolicyServiceClient}; -export default {v1, v1beta1, DataPolicyServiceClient}; +export {v1, v1beta1, v2beta1, DataPolicyServiceClient}; +export default {v1, v1beta1, v2beta1, DataPolicyServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_client.ts b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_client.ts new file mode 100644 index 000000000000..c12f65914509 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_client.ts @@ -0,0 +1,1663 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2beta1/data_policy_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './data_policy_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Data Policy Service provides APIs for managing the BigQuery Data Policy. + * @class + * @memberof v2beta1 + */ +export class DataPolicyServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('datapolicies'); + + 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}; + dataPolicyServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of DataPolicyServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DataPolicyServiceClient({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 DataPolicyServiceClient; + 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 = 'bigquerydatapolicy.' + 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 = { + dataPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dataPolicies/{data_policy}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + policyTagPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listDataPolicies: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'dataPolicies') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService', 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.dataPolicyServiceStub) { + return this.dataPolicyServiceStub; + } + + // Put together the "service stub" for + // google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService. + this.dataPolicyServiceStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService, + 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 dataPolicyServiceStubMethods = + ['createDataPolicy', 'addGrantees', 'removeGrantees', 'updateDataPolicy', 'deleteDataPolicy', 'getDataPolicy', 'listDataPolicies', 'getIamPolicy', 'setIamPolicy', 'testIamPermissions']; + for (const methodName of dataPolicyServiceStubMethods) { + const callPromise = this.dataPolicyServiceStub.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.dataPolicyServiceStub; + } + + /** + * 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 'bigquerydatapolicy.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 'bigquerydatapolicy.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/bigquery', + '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 -- + // ------------------- +/** + * Creates a new data policy under a project with the given `data_policy_id` + * (used as the display name), and data policy type. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project that the data policy will belong to. + * The format is `projects/{project_number}/locations/{location_id}`. + * @param {string} request.dataPolicyId + * Required. User-assigned (human readable) ID of the data policy that needs + * to be unique within a project. Used as {data_policy_id} in part of the + * resource name. + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} request.dataPolicy + * Required. The data policy to create. The `name` field does not need to be + * provided for the data policy creation. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy}. + * 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/v2beta1/data_policy_service.create_data_policy.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_CreateDataPolicy_async + */ + createDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|undefined, {}|undefined + ]>; + createDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + createDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + createDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createDataPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createDataPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createDataPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.ICreateDataPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('createDataPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Adds new grantees to a data policy. + * The new grantees will be added to the existing grantees. + * If the request contains a duplicate grantee, the grantee will be ignored. + * If the request contains a grantee that already exists, the grantee will be + * ignored. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataPolicy + * Required. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * @param {string[]} request.grantees + * Required. IAM principal that should be granted Fine Grained Access to the + * underlying data goverened by the data policy. The target data policy is + * determined by the `data_policy` field. + * + * Uses the [IAM V2 principal + * syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2). + * Supported principal types: + * + * * User + * * Group + * * Service account + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy}. + * 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/v2beta1/data_policy_service.add_grantees.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_AddGrantees_async + */ + addGrantees( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|undefined, {}|undefined + ]>; + addGrantees( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|null|undefined, + {}|null|undefined>): void; + addGrantees( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|null|undefined, + {}|null|undefined>): void; + addGrantees( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'data_policy': request.dataPolicy ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('addGrantees request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('addGrantees response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.addGrantees(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IAddGranteesRequest|undefined, + {}|undefined + ]) => { + this._log.info('addGrantees response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Removes grantees from a data policy. + * The grantees will be removed from the existing grantees. + * If the request contains a grantee that does not exist, the grantee will be + * ignored. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.dataPolicy + * Required. Resource name of this data policy, in the format of + * `projects/{project_number}/locations/{location_id}/dataPolicies/{data_policy_id}`. + * @param {string[]} request.grantees + * Required. IAM principal that should be revoked from Fine Grained Access to + * the underlying data goverened by the data policy. The target data policy is + * determined by the `data_policy` field. + * + * Uses the [IAM V2 principal + * syntax](https://cloud.google.com/iam/docs/principal-identifiers#v2). + * Supported principal types: + * + * * User + * * Group + * * Service account + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy}. + * 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/v2beta1/data_policy_service.remove_grantees.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_RemoveGrantees_async + */ + removeGrantees( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|undefined, {}|undefined + ]>; + removeGrantees( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|null|undefined, + {}|null|undefined>): void; + removeGrantees( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|null|undefined, + {}|null|undefined>): void; + removeGrantees( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'data_policy': request.dataPolicy ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('removeGrantees request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('removeGrantees response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.removeGrantees(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IRemoveGranteesRequest|undefined, + {}|undefined + ]) => { + this._log.info('removeGrantees response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Updates the metadata for an existing data policy. The target data policy + * can be specified by the resource name. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.bigquery.datapolicies.v2beta1.DataPolicy} request.dataPolicy + * Required. Update the data policy's metadata. + * + * The target data policy is determined by the `name` field. + * Other fields are updated to the specified values based on the field masks. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. The update mask applies to the resource. For the `FieldMask` + * definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + * If not set, defaults to all of the fields that are allowed to update. + * + * Updates to the `name` and `dataPolicyId` fields are not allowed. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy}. + * 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/v2beta1/data_policy_service.update_data_policy.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_UpdateDataPolicy_async + */ + updateDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|undefined, {}|undefined + ]>; + updateDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + updateDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + updateDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'data_policy.name': request.dataPolicy!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateDataPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateDataPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateDataPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IUpdateDataPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateDataPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Deletes the data policy specified by its resource name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the data policy to delete. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{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/v2beta1/data_policy_service.delete_data_policy.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_DeleteDataPolicy_async + */ + deleteDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|undefined, {}|undefined + ]>; + deleteDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + deleteDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + deleteDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteDataPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteDataPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteDataPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDeleteDataPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteDataPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the data policy specified by its resource name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the requested data policy. Format is + * `projects/{project_number}/locations/{location_id}/dataPolicies/{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.cloud.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy}. + * 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/v2beta1/data_policy_service.get_data_policy.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetDataPolicy_async + */ + getDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|undefined, {}|undefined + ]>; + getDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + getDataPolicy( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest, + callback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|null|undefined, + {}|null|undefined>): void; + getDataPolicy( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getDataPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDataPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getDataPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy, + protos.google.cloud.bigquery.datapolicies.v2beta1.IGetDataPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getDataPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets the IAM policy for the specified data policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.GetPolicyOptions} request.options + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.iam.v1.Policy|Policy}. + * 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/v2beta1/data_policy_service.get_iam_policy.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_GetIamPolicy_async + */ + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request: protos.google.iam.v1.IGetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + getIamPolicy( + request?: protos.google.iam.v1.IGetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.IGetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Sets the IAM policy for the specified data policy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being specified. + * See the operation documentation for the appropriate value for this field. + * @param {google.iam.v1.Policy} request.policy + * REQUIRED: The complete policy to be applied to the `resource`. The size of + * the policy is limited to a few 10s of KB. An empty policy is a + * valid policy but certain Cloud Platform services (such as Projects) + * might reject them. + * @param {google.protobuf.FieldMask} request.updateMask + * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only + * the fields in the mask will be modified. If no mask is provided, the + * following default mask is used: + * + * `paths: "bindings, etag"` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.iam.v1.Policy|Policy}. + * 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/v2beta1/data_policy_service.set_iam_policy.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_SetIamPolicy_async + */ + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request: protos.google.iam.v1.ISetIamPolicyRequest, + callback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): void; + setIamPolicy( + request?: protos.google.iam.v1.ISetIamPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('setIamPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('setIamPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.setIamPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.IPolicy, + protos.google.iam.v1.ISetIamPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('setIamPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns the caller's permission on the specified data policy resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.iam.v1.TestIamPermissionsResponse|TestIamPermissionsResponse}. + * 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/v2beta1/data_policy_service.test_iam_permissions.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_TestIamPermissions_async + */ + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + options?: CallOptions): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + options: CallOptions, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request: protos.google.iam.v1.ITestIamPermissionsRequest, + callback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): void; + testIamPermissions( + request?: protos.google.iam.v1.ITestIamPermissionsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'resource': request.resource ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('testIamPermissions request %j', request); + const wrappedCallback: Callback< + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('testIamPermissions response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.testIamPermissions(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.iam.v1.ITestIamPermissionsResponse, + protos.google.iam.v1.ITestIamPermissionsRequest|undefined, + {}|undefined + ]) => { + this._log.info('testIamPermissions response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + + /** + * List all of the data policies in the specified parent project. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of data policies to return. Must be a value + * between 1 and 1000. If not set, defaults to 50. + * @param {string} [request.pageToken] + * Optional. The `nextPageToken` value returned from a previous list request, + * if any. If not set, defaults to an empty string. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy}. + * 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 `listDataPoliciesAsync()` + * 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. + */ + listDataPolicies( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[], + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest|null, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse + ]>; + listDataPolicies( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse|null|undefined, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy>): void; + listDataPolicies( + request: protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + callback: PaginationCallback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse|null|undefined, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy>): void; + listDataPolicies( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse|null|undefined, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy>, + callback?: PaginationCallback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse|null|undefined, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy>): + Promise<[ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[], + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest|null, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse|null|undefined, + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDataPolicies values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDataPolicies request %j', request); + return this.innerApiCalls + .listDataPolicies(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[], + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest|null, + protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesResponse + ]) => { + this._log.info('listDataPolicies values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listDataPolicies`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of data policies to return. Must be a value + * between 1 and 1000. If not set, defaults to 50. + * @param {string} [request.pageToken] + * Optional. The `nextPageToken` value returned from a previous list request, + * if any. If not set, defaults to an empty string. + * @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.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy} 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 `listDataPoliciesAsync()` + * 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. + */ + listDataPoliciesStream( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + 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['listDataPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataPolicies stream %j', request); + return this.descriptors.page.listDataPolicies.createStream( + this.innerApiCalls.listDataPolicies as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listDataPolicies`, 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. Resource name of the project for which to list data policies. + * Format is `projects/{project_number}/locations/{location_id}`. + * @param {number} [request.pageSize] + * Optional. The maximum number of data policies to return. Must be a value + * between 1 and 1000. If not set, defaults to 50. + * @param {string} [request.pageToken] + * Optional. The `nextPageToken` value returned from a previous list request, + * if any. If not set, defaults to an empty string. + * @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.bigquery.datapolicies.v2beta1.DataPolicy|DataPolicy}. 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/v2beta1/data_policy_service.list_data_policies.js + * region_tag:bigquerydatapolicy_v2beta1_generated_DataPolicyService_ListDataPolicies_async + */ + listDataPoliciesAsync( + request?: protos.google.cloud.bigquery.datapolicies.v2beta1.IListDataPoliciesRequest, + 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['listDataPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listDataPolicies iterate %j', request); + return this.descriptors.page.listDataPolicies.asyncIterate( + this.innerApiCalls['listDataPolicies'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified dataPolicy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} data_policy + * @returns {string} Resource name string. + */ + dataPolicyPath(project:string,location:string,dataPolicy:string) { + return this.pathTemplates.dataPolicyPathTemplate.render({ + project: project, + location: location, + data_policy: dataPolicy, + }); + } + + /** + * Parse the project from DataPolicy resource. + * + * @param {string} dataPolicyName + * A fully-qualified path representing DataPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDataPolicyName(dataPolicyName: string) { + return this.pathTemplates.dataPolicyPathTemplate.match(dataPolicyName).project; + } + + /** + * Parse the location from DataPolicy resource. + * + * @param {string} dataPolicyName + * A fully-qualified path representing DataPolicy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDataPolicyName(dataPolicyName: string) { + return this.pathTemplates.dataPolicyPathTemplate.match(dataPolicyName).location; + } + + /** + * Parse the data_policy from DataPolicy resource. + * + * @param {string} dataPolicyName + * A fully-qualified path representing DataPolicy resource. + * @returns {string} A string representing the data_policy. + */ + matchDataPolicyFromDataPolicyName(dataPolicyName: string) { + return this.pathTemplates.dataPolicyPathTemplate.match(dataPolicyName).data_policy; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified policyTag resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} taxonomy + * @param {string} policy_tag + * @returns {string} Resource name string. + */ + policyTagPath(project:string,location:string,taxonomy:string,policyTag:string) { + return this.pathTemplates.policyTagPathTemplate.render({ + project: project, + location: location, + taxonomy: taxonomy, + policy_tag: policyTag, + }); + } + + /** + * Parse the project from PolicyTag resource. + * + * @param {string} policyTagName + * A fully-qualified path representing PolicyTag resource. + * @returns {string} A string representing the project. + */ + matchProjectFromPolicyTagName(policyTagName: string) { + return this.pathTemplates.policyTagPathTemplate.match(policyTagName).project; + } + + /** + * Parse the location from PolicyTag resource. + * + * @param {string} policyTagName + * A fully-qualified path representing PolicyTag resource. + * @returns {string} A string representing the location. + */ + matchLocationFromPolicyTagName(policyTagName: string) { + return this.pathTemplates.policyTagPathTemplate.match(policyTagName).location; + } + + /** + * Parse the taxonomy from PolicyTag resource. + * + * @param {string} policyTagName + * A fully-qualified path representing PolicyTag resource. + * @returns {string} A string representing the taxonomy. + */ + matchTaxonomyFromPolicyTagName(policyTagName: string) { + return this.pathTemplates.policyTagPathTemplate.match(policyTagName).taxonomy; + } + + /** + * Parse the policy_tag from PolicyTag resource. + * + * @param {string} policyTagName + * A fully-qualified path representing PolicyTag resource. + * @returns {string} A string representing the policy_tag. + */ + matchPolicyTagFromPolicyTagName(policyTagName: string) { + return this.pathTemplates.policyTagPathTemplate.match(policyTagName).policy_tag; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * 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.dataPolicyServiceStub && !this._terminated) { + return this.dataPolicyServiceStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_client_config.json b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_client_config.json new file mode 100644 index 000000000000..1ac1238d1957 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_client_config.json @@ -0,0 +1,90 @@ +{ + "interfaces": { + "google.cloud.bigquery.datapolicies.v2beta1.DataPolicyService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "deadline_exceeded_resource_exhausted_unavailable": [ + "DEADLINE_EXCEEDED", + "RESOURCE_EXHAUSTED", + "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": { + "CreateDataPolicy": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "AddGrantees": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RemoveGrantees": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateDataPolicy": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteDataPolicy": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataPolicy": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListDataPolicies": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetIamPolicy": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "SetIamPolicy": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "TestIamPermissions": { + "timeout_millis": 64000, + "retry_codes_name": "deadline_exceeded_resource_exhausted_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_proto_list.json b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_proto_list.json new file mode 100644 index 000000000000..339eb0ea1b94 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/data_policy_service_proto_list.json @@ -0,0 +1,3 @@ +[ + "../../protos/google/cloud/bigquery/datapolicies/v2beta1/datapolicy.proto" +] diff --git a/packages/google-cloud-bigquery-datapolicies/src/v2beta1/gapic_metadata.json b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/gapic_metadata.json new file mode 100644 index 000000000000..9cf53f9c00e6 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/gapic_metadata.json @@ -0,0 +1,127 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.bigquery.datapolicies.v2beta1", + "libraryPackage": "@google-cloud/datapolicies", + "services": { + "DataPolicyService": { + "clients": { + "grpc": { + "libraryClient": "DataPolicyServiceClient", + "rpcs": { + "CreateDataPolicy": { + "methods": [ + "createDataPolicy" + ] + }, + "AddGrantees": { + "methods": [ + "addGrantees" + ] + }, + "RemoveGrantees": { + "methods": [ + "removeGrantees" + ] + }, + "UpdateDataPolicy": { + "methods": [ + "updateDataPolicy" + ] + }, + "DeleteDataPolicy": { + "methods": [ + "deleteDataPolicy" + ] + }, + "GetDataPolicy": { + "methods": [ + "getDataPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "ListDataPolicies": { + "methods": [ + "listDataPolicies", + "listDataPoliciesStream", + "listDataPoliciesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DataPolicyServiceClient", + "rpcs": { + "CreateDataPolicy": { + "methods": [ + "createDataPolicy" + ] + }, + "AddGrantees": { + "methods": [ + "addGrantees" + ] + }, + "RemoveGrantees": { + "methods": [ + "removeGrantees" + ] + }, + "UpdateDataPolicy": { + "methods": [ + "updateDataPolicy" + ] + }, + "DeleteDataPolicy": { + "methods": [ + "deleteDataPolicy" + ] + }, + "GetDataPolicy": { + "methods": [ + "getDataPolicy" + ] + }, + "GetIamPolicy": { + "methods": [ + "getIamPolicy" + ] + }, + "SetIamPolicy": { + "methods": [ + "setIamPolicy" + ] + }, + "TestIamPermissions": { + "methods": [ + "testIamPermissions" + ] + }, + "ListDataPolicies": { + "methods": [ + "listDataPolicies", + "listDataPoliciesStream", + "listDataPoliciesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-bigquery-datapolicies/src/v2beta1/index.ts b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/index.ts new file mode 100644 index 000000000000..373c3956223d --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/src/v2beta1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {DataPolicyServiceClient} from './data_policy_service_client'; diff --git a/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v2beta1.ts b/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v2beta1.ts new file mode 100644 index 000000000000..1a2733fadd36 --- /dev/null +++ b/packages/google-cloud-bigquery-datapolicies/test/gapic_data_policy_service_v2beta1.ts @@ -0,0 +1,1653 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 datapolicyserviceModule 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('v2beta1.DataPolicyServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerydatapolicy.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient(); + 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 = datapolicyserviceModule.v2beta1.DataPolicyServiceClient.servicePath; + assert.strictEqual(servicePath, 'bigquerydatapolicy.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = datapolicyserviceModule.v2beta1.DataPolicyServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerydatapolicy.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerydatapolicy.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerydatapolicy.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 datapolicyserviceModule.v2beta1.DataPolicyServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerydatapolicy.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 datapolicyserviceModule.v2beta1.DataPolicyServiceClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerydatapolicy.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 datapolicyserviceModule.v2beta1.DataPolicyServiceClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = datapolicyserviceModule.v2beta1.DataPolicyServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataPolicyServiceStub, undefined); + await client.initialize(); + assert(client.dataPolicyServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.dataPolicyServiceStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.dataPolicyServiceStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + 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 datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + 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('createDataPolicy', () => { + it('invokes createDataPolicy without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.createDataPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.createDataPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataPolicy without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.createDataPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataPolicy( + request, + (err?: Error|null, result?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataPolicy with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createDataPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.createDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataPolicy with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.CreateDataPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createDataPolicy(request), expectedError); + }); + }); + + describe('addGrantees', () => { + it('invokes addGrantees without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedHeaderRequestParams = `data_policy=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.addGrantees = stubSimpleCall(expectedResponse); + const [response] = await client.addGrantees(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.addGrantees as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.addGrantees as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes addGrantees without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedHeaderRequestParams = `data_policy=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.addGrantees = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.addGrantees( + request, + (err?: Error|null, result?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.addGrantees as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.addGrantees as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes addGrantees with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedHeaderRequestParams = `data_policy=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.addGrantees = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.addGrantees(request), expectedError); + const actualRequest = (client.innerApiCalls.addGrantees as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.addGrantees as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes addGrantees with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.AddGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.addGrantees(request), expectedError); + }); + }); + + describe('removeGrantees', () => { + it('invokes removeGrantees without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedHeaderRequestParams = `data_policy=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.removeGrantees = stubSimpleCall(expectedResponse); + const [response] = await client.removeGrantees(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.removeGrantees as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.removeGrantees as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeGrantees without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedHeaderRequestParams = `data_policy=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.removeGrantees = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.removeGrantees( + request, + (err?: Error|null, result?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.removeGrantees as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.removeGrantees as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeGrantees with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedHeaderRequestParams = `data_policy=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.removeGrantees = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.removeGrantees(request), expectedError); + const actualRequest = (client.innerApiCalls.removeGrantees as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.removeGrantees as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes removeGrantees with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.RemoveGranteesRequest', ['dataPolicy']); + request.dataPolicy = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.removeGrantees(request), expectedError); + }); + }); + + describe('updateDataPolicy', () => { + it('invokes updateDataPolicy without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest() + ); + request.dataPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest', ['dataPolicy', 'name']); + request.dataPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `data_policy.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.updateDataPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.updateDataPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataPolicy without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest() + ); + request.dataPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest', ['dataPolicy', 'name']); + request.dataPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `data_policy.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.updateDataPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataPolicy( + request, + (err?: Error|null, result?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataPolicy with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest() + ); + request.dataPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest', ['dataPolicy', 'name']); + request.dataPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `data_policy.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateDataPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.updateDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataPolicy with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest() + ); + request.dataPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.UpdateDataPolicyRequest', ['dataPolicy', 'name']); + request.dataPolicy.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateDataPolicy(request), expectedError); + }); + }); + + describe('deleteDataPolicy', () => { + it('invokes deleteDataPolicy without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDataPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataPolicy without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataPolicy( + 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.deleteDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataPolicy with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteDataPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataPolicy with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.DeleteDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteDataPolicy(request), expectedError); + }); + }); + + describe('getDataPolicy', () => { + it('invokes getDataPolicy without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.getDataPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getDataPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataPolicy without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy() + ); + client.innerApiCalls.getDataPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataPolicy( + request, + (err?: Error|null, result?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataPolicy with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDataPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getDataPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getDataPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataPolicy with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.GetDataPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getDataPolicy(request), expectedError); + }); + }); + + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.getIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getIamPolicy with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.GetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.GetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getIamPolicy(request), expectedError); + }); + }); + + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.setIamPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.Policy() + ); + client.innerApiCalls.setIamPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + (err?: Error|null, result?: protos.google.iam.v1.IPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.setIamPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setIamPolicy with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.SetIamPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.SetIamPolicyRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.setIamPolicy(request), expectedError); + }); + }); + + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCall(expectedResponse); + const [response] = await client.testIamPermissions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsResponse() + ); + client.innerApiCalls.testIamPermissions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + (err?: Error|null, result?: protos.google.iam.v1.ITestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedHeaderRequestParams = `resource=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.testIamPermissions(request), expectedError); + const actualRequest = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.testIamPermissions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes testIamPermissions with closed client', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.iam.v1.TestIamPermissionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.iam.v1.TestIamPermissionsRequest', ['resource']); + request.resource = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.testIamPermissions(request), expectedError); + }); + }); + + describe('listDataPolicies', () => { + it('invokes listDataPolicies without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + ]; + client.innerApiCalls.listDataPolicies = stubSimpleCall(expectedResponse); + const [response] = await client.listDataPolicies(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataPolicies without error using callback', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + ]; + client.innerApiCalls.listDataPolicies = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataPolicies( + request, + (err?: Error|null, result?: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listDataPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataPolicies with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataPolicies = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listDataPolicies(request), expectedError); + const actualRequest = (client.innerApiCalls.listDataPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listDataPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataPoliciesStream without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + ]; + client.descriptors.page.listDataPolicies.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listDataPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy[] = []; + stream.on('data', (response: protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) => { + 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.listDataPolicies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataPolicies, request)); + assert( + (client.descriptors.page.listDataPolicies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataPoliciesStream with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataPolicies.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy[] = []; + stream.on('data', (response: protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listDataPolicies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listDataPolicies, request)); + assert( + (client.descriptors.page.listDataPolicies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataPolicies without error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + generateSampleMessage(new protos.google.cloud.bigquery.datapolicies.v2beta1.DataPolicy()), + ]; + client.descriptors.page.listDataPolicies.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[] = []; + const iterable = client.listDataPoliciesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDataPolicies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataPolicies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataPolicies with error', async () => { + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.bigquery.datapolicies.v2beta1.ListDataPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataPolicies.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataPoliciesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.bigquery.datapolicies.v2beta1.IDataPolicy[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDataPolicies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listDataPolicies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('dataPolicy', async () => { + const fakePath = "/rendered/path/dataPolicy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + data_policy: "dataPolicyValue", + }; + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.dataPolicyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.dataPolicyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('dataPolicyPath', () => { + const result = client.dataPolicyPath("projectValue", "locationValue", "dataPolicyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.dataPolicyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromDataPolicyName', () => { + const result = client.matchProjectFromDataPolicyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.dataPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromDataPolicyName', () => { + const result = client.matchLocationFromDataPolicyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.dataPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchDataPolicyFromDataPolicyName', () => { + const result = client.matchDataPolicyFromDataPolicyName(fakePath); + assert.strictEqual(result, "dataPolicyValue"); + assert((client.pathTemplates.dataPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('policyTag', async () => { + const fakePath = "/rendered/path/policyTag"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + taxonomy: "taxonomyValue", + policy_tag: "policyTagValue", + }; + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.policyTagPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.policyTagPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('policyTagPath', () => { + const result = client.policyTagPath("projectValue", "locationValue", "taxonomyValue", "policyTagValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.policyTagPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromPolicyTagName', () => { + const result = client.matchProjectFromPolicyTagName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.policyTagPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromPolicyTagName', () => { + const result = client.matchLocationFromPolicyTagName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.policyTagPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchTaxonomyFromPolicyTagName', () => { + const result = client.matchTaxonomyFromPolicyTagName(fakePath); + assert.strictEqual(result, "taxonomyValue"); + assert((client.pathTemplates.policyTagPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPolicyTagFromPolicyTagName', () => { + const result = client.matchPolicyTagFromPolicyTagName(fakePath); + assert.strictEqual(result, "policyTagValue"); + assert((client.pathTemplates.policyTagPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new datapolicyserviceModule.v2beta1.DataPolicyServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-config/CHANGELOG.md b/packages/google-cloud-config/CHANGELOG.md index b805b1f87eb5..862bb3d72aee 100644 --- a/packages/google-cloud-config/CHANGELOG.md +++ b/packages/google-cloud-config/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.10.0](https://github.com/googleapis/google-cloud-node/compare/config-v0.9.0...config-v0.10.0) (2025-07-17) + + +### Features + +* [infra-manager] added resource change and drift details for the preview ([#6475](https://github.com/googleapis/google-cloud-node/issues/6475)) ([c949b3f](https://github.com/googleapis/google-cloud-node/commit/c949b3f677349035c669b1052ce49f0f8a6fbf06)) + ## [0.9.0](https://github.com/googleapis/google-cloud-node/compare/config-v0.8.1...config-v0.9.0) (2025-07-09) diff --git a/packages/google-cloud-config/README.md b/packages/google-cloud-config/README.md index e7a028c61ba4..2fcf38223d2c 100644 --- a/packages/google-cloud-config/README.md +++ b/packages/google-cloud-config/README.md @@ -149,11 +149,15 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Config.get_deployment | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_deployment.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_deployment.js,packages/google-cloud-config/samples/README.md) | | Config.get_preview | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_preview.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_preview.js,packages/google-cloud-config/samples/README.md) | | Config.get_resource | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_resource.js,packages/google-cloud-config/samples/README.md) | +| Config.get_resource_change | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js,packages/google-cloud-config/samples/README.md) | +| Config.get_resource_drift | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js,packages/google-cloud-config/samples/README.md) | | Config.get_revision | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_revision.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_revision.js,packages/google-cloud-config/samples/README.md) | | Config.get_terraform_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_terraform_version.js,packages/google-cloud-config/samples/README.md) | | Config.import_statefile | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.import_statefile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.import_statefile.js,packages/google-cloud-config/samples/README.md) | | Config.list_deployments | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_deployments.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_deployments.js,packages/google-cloud-config/samples/README.md) | | Config.list_previews | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_previews.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_previews.js,packages/google-cloud-config/samples/README.md) | +| Config.list_resource_changes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js,packages/google-cloud-config/samples/README.md) | +| Config.list_resource_drifts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js,packages/google-cloud-config/samples/README.md) | | Config.list_resources | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resources.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_resources.js,packages/google-cloud-config/samples/README.md) | | Config.list_revisions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_revisions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_revisions.js,packages/google-cloud-config/samples/README.md) | | Config.list_terraform_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js,packages/google-cloud-config/samples/README.md) | diff --git a/packages/google-cloud-config/package.json b/packages/google-cloud-config/package.json index fc835e89a136..d19b8fb67a1b 100644 --- a/packages/google-cloud-config/package.json +++ b/packages/google-cloud-config/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/config", - "version": "0.9.0", + "version": "0.10.0", "description": "Infrastructure Manager API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto b/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto index 083e62ef88e3..6eaea8fcd697 100644 --- a/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto +++ b/packages/google-cloud-config/protos/google/cloud/config/v1/config.proto @@ -288,6 +288,40 @@ service Config { }; option (google.api.method_signature) = "name"; } + + // Lists ResourceChanges for a given preview. + rpc ListResourceChanges(ListResourceChangesRequest) + returns (ListResourceChangesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a ResourceChange for a given preview. + rpc GetResourceChange(GetResourceChangeRequest) returns (ResourceChange) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List ResourceDrifts for a given preview. + rpc ListResourceDrifts(ListResourceDriftsRequest) + returns (ListResourceDriftsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts" + }; + option (google.api.method_signature) = "parent"; + } + + // Get a ResourceDrift for a given preview. + rpc GetResourceDrift(GetResourceDriftRequest) returns (ResourceDrift) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}" + }; + option (google.api.method_signature) = "name"; + } } // Enum values to control quota checks for resources in terraform @@ -401,9 +435,9 @@ message Deployment { TerraformBlueprint terraform_blueprint = 6; } - // Resource name of the deployment. + // Identifier. Resource name of the deployment. // Format: `projects/{project}/locations/{location}/deployments/{deployment}` - string name = 1; + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; // Output only. Time when the deployment was created. google.protobuf.Timestamp create_time = 2 @@ -413,8 +447,8 @@ message Deployment { google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // User-defined metadata for the deployment. - map labels = 4; + // Optional. User-defined metadata for the deployment. + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; // Output only. Current state of the deployment. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -536,14 +570,16 @@ message TerraformBlueprint { GitSource git_source = 2; } - // Input variable values for the Terraform blueprint. - map input_values = 4; + // Optional. Input variable values for the Terraform blueprint. + map input_values = 4 + [(google.api.field_behavior) = OPTIONAL]; } // A Terraform input variable. message TerraformVariable { - // Input variable value. - google.protobuf.Value input_value = 5; + // Optional. Input variable value. + google.protobuf.Value input_value = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Outputs and artifacts from applying a deployment. @@ -1048,8 +1084,9 @@ message TerraformError { // A human-readable error description. string error_description = 3; - // Original error response from underlying Google API, if available. - google.rpc.Status error = 4; + // Output only. Original error response from underlying Google API, if + // available. + google.rpc.Status error = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A set of files in a Git repository. @@ -1595,7 +1632,7 @@ message Preview { [(google.api.field_behavior) = OPTIONAL]; // Optional. Arbitrary key-value metadata storage e.g. to help client tools - // identifiy preview during automation. See + // identify preview during automation. See // https://google.aip.dev/148#annotations for details on format and size // limitations. map annotations = 20 [(google.api.field_behavior) = OPTIONAL]; @@ -1849,14 +1886,14 @@ message ListTerraformVersionsRequest { } ]; - // Optional. When requesting a page of resources, 'page_size' specifies number - // of resources to return. If unspecified, at most 500 will be returned. The - // maximum value is 1000. + // Optional. When requesting a page of terraform versions, 'page_size' + // specifies number of terraform versions to return. If unspecified, at most + // 500 will be returned. The maximum value is 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Token returned by previous call to 'ListTerraformVersions' which // specifies the position in the list from where to continue listing the - // resources. + // terraform versions. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Lists the TerraformVersions that match the filter expression. A @@ -1930,3 +1967,285 @@ message TerraformVersion { optional google.protobuf.Timestamp obsolete_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } + +// Terraform info of a ResourceChange. +message ResourceChangeTerraformInfo { + // Output only. TF resource address that uniquely identifies the resource. + string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource type. + string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource name. + string resource_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource provider. + string provider = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource actions. + repeated string actions = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource change represents a change to a resource in the state file. +message ResourceChange { + option (google.api.resource) = { + type: "config.googleapis.com/ResourceChange" + pattern: "projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}" + plural: "resourceChanges" + singular: "resourceChange" + }; + + // Possible intent of the resource change. + enum Intent { + // The default value. + INTENT_UNSPECIFIED = 0; + + // The resource will be created. + CREATE = 1; + + // The resource will be updated. + UPDATE = 2; + + // The resource will be deleted. + DELETE = 3; + + // The resource will be recreated. + RECREATE = 4; + + // The resource will be untouched. + UNCHANGED = 5; + } + + // Identifier. The name of the resource change. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Terraform info of the resource change. + ResourceChangeTerraformInfo terraform_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The intent of the resource change. + Intent intent = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The property changes of the resource change. + repeated PropertyChange property_changes = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A property change represents a change to a property in the state file. +message PropertyChange { + // Output only. The path of the property change. + string path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `before`. Paths are relative + // to `path`. + repeated string before_sensitive_paths = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value before the actions. + google.protobuf.Value before = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `after`. Paths are relative + // to `path`. + repeated string after_sensitive_paths = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value after the actions. + google.protobuf.Value after = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for the ListResourceChanges method. +message ListResourceChangesRequest { + // Required. The parent in whose context the ResourceChanges are listed. The + // parent value is in the format: + // 'projects/{project_id}/locations/{location}/previews/{preview}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } + ]; + + // Optional. When requesting a page of resource changes, 'page_size' specifies + // number of resource changes to return. If unspecified, at most 500 will be + // returned. The maximum value is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to 'ListResourceChanges' which + // specifies the position in the list from where to continue listing the + // resource changes. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the resource changes that match the filter expression. A + // filter expression filters the resource changes listed in the response. The + // expression must be of the form '{field} {operator} {value}' where + // operators: '<', '>', + // '<=', + // '>=', + // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + // roughly synonymous with equality). {field} can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = + // "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response to a 'ListResourceChanges' call. Contains a list of +// ResourceChanges. +message ListResourceChangesResponse { + // List of ResourceChanges. + repeated ResourceChange resource_changes = 1; + + // A token to request the next page of resources from the + // 'ListResourceChanges' method. The value of an empty string means that + // there are no more resources to return. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the GetResourceChange method. +message GetResourceChangeRequest { + // Required. The name of the resource change to retrieve. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/ResourceChange" + } + ]; +} + +// Terraform info of a ResourceChange. +message ResourceDriftTerraformInfo { + // Output only. The address of the drifted resource. + string address = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The type of the drifted resource. + string type = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. TF resource name. + string resource_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The provider of the drifted resource. + string provider = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource drift represents a drift to a resource in the state file. +message ResourceDrift { + option (google.api.resource) = { + type: "config.googleapis.com/ResourceDrift" + pattern: "projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}" + plural: "resourceDrifts" + singular: "resourceDrift" + }; + + // Identifier. The name of the resource drift. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. Terraform info of the resource drift. + ResourceDriftTerraformInfo terraform_info = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The property drifts of the resource drift. + repeated PropertyDrift property_drifts = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A property drift represents a drift to a property in the state file. +message PropertyDrift { + // Output only. The path of the property drift. + string path = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `before`. Paths are relative + // to `path`. + repeated string before_sensitive_paths = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value before the actions. + google.protobuf.Value before = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The paths of sensitive fields in `after`. Paths are relative + // to `path`. + repeated string after_sensitive_paths = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Representations of the object value after the actions. + google.protobuf.Value after = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The request message for the ListResourceDrifts method. +message ListResourceDriftsRequest { + // Required. The parent in whose context the ResourceDrifts are listed. The + // parent value is in the format: + // 'projects/{project_id}/locations/{location}/previews/{preview}'. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "config.googleapis.com/Preview" } + ]; + + // Optional. When requesting a page of resource drifts, 'page_size' specifies + // number of resource drifts to return. If unspecified, at most 500 will be + // returned. The maximum value is 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to 'ListResourceDrifts' which + // specifies the position in the list from where to continue listing the + // resource drifts. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Lists the resource drifts that match the filter expression. A + // filter expression filters the resource drifts listed in the response. The + // expression must be of the form '{field} {operator} {value}' where + // operators: '<', '>', + // '<=', + // '>=', + // '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + // roughly synonymous with equality). {field} can refer to a proto or JSON + // field, or a synthetic field. Field names can be camelCase or snake_case. + // + // Examples: + // - Filter by name: + // name = + // "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Field to use to sort the list. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A response to a 'ListResourceDrifts' call. Contains a list of ResourceDrifts. +message ListResourceDriftsResponse { + // List of ResourceDrifts. + repeated ResourceDrift resource_drifts = 1; + + // A token to request the next page of resources from the + // 'ListResourceDrifts' method. The value of an empty string means that + // there are no more resources to return. + string next_page_token = 2; + + // Unreachable resources, if any. + repeated string unreachable = 3; +} + +// The request message for the GetResourceDrift method. +message GetResourceDriftRequest { + // Required. The name of the resource drift to retrieve. + // Format: + // 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "config.googleapis.com/ResourceDrift" + } + ]; +} diff --git a/packages/google-cloud-config/protos/protos.d.ts b/packages/google-cloud-config/protos/protos.d.ts index 5e6b0454d96c..7fe85e90745f 100644 --- a/packages/google-cloud-config/protos/protos.d.ts +++ b/packages/google-cloud-config/protos/protos.d.ts @@ -367,6 +367,62 @@ export namespace google { * @returns Promise */ public getTerraformVersion(request: google.cloud.config.v1.IGetTerraformVersionRequest): Promise; + + /** + * Calls ListResourceChanges. + * @param request ListResourceChangesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListResourceChangesResponse + */ + public listResourceChanges(request: google.cloud.config.v1.IListResourceChangesRequest, callback: google.cloud.config.v1.Config.ListResourceChangesCallback): void; + + /** + * Calls ListResourceChanges. + * @param request ListResourceChangesRequest message or plain object + * @returns Promise + */ + public listResourceChanges(request: google.cloud.config.v1.IListResourceChangesRequest): Promise; + + /** + * Calls GetResourceChange. + * @param request GetResourceChangeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ResourceChange + */ + public getResourceChange(request: google.cloud.config.v1.IGetResourceChangeRequest, callback: google.cloud.config.v1.Config.GetResourceChangeCallback): void; + + /** + * Calls GetResourceChange. + * @param request GetResourceChangeRequest message or plain object + * @returns Promise + */ + public getResourceChange(request: google.cloud.config.v1.IGetResourceChangeRequest): Promise; + + /** + * Calls ListResourceDrifts. + * @param request ListResourceDriftsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListResourceDriftsResponse + */ + public listResourceDrifts(request: google.cloud.config.v1.IListResourceDriftsRequest, callback: google.cloud.config.v1.Config.ListResourceDriftsCallback): void; + + /** + * Calls ListResourceDrifts. + * @param request ListResourceDriftsRequest message or plain object + * @returns Promise + */ + public listResourceDrifts(request: google.cloud.config.v1.IListResourceDriftsRequest): Promise; + + /** + * Calls GetResourceDrift. + * @param request GetResourceDriftRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ResourceDrift + */ + public getResourceDrift(request: google.cloud.config.v1.IGetResourceDriftRequest, callback: google.cloud.config.v1.Config.GetResourceDriftCallback): void; + + /** + * Calls GetResourceDrift. + * @param request GetResourceDriftRequest message or plain object + * @returns Promise + */ + public getResourceDrift(request: google.cloud.config.v1.IGetResourceDriftRequest): Promise; } namespace Config { @@ -531,6 +587,34 @@ export namespace google { * @param [response] TerraformVersion */ type GetTerraformVersionCallback = (error: (Error|null), response?: google.cloud.config.v1.TerraformVersion) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceChanges}. + * @param error Error, if any + * @param [response] ListResourceChangesResponse + */ + type ListResourceChangesCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourceChangesResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceChange}. + * @param error Error, if any + * @param [response] ResourceChange + */ + type GetResourceChangeCallback = (error: (Error|null), response?: google.cloud.config.v1.ResourceChange) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceDrifts}. + * @param error Error, if any + * @param [response] ListResourceDriftsResponse + */ + type ListResourceDriftsCallback = (error: (Error|null), response?: google.cloud.config.v1.ListResourceDriftsResponse) => void; + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceDrift}. + * @param error Error, if any + * @param [response] ResourceDrift + */ + type GetResourceDriftCallback = (error: (Error|null), response?: google.cloud.config.v1.ResourceDrift) => void; } /** QuotaValidation enum. */ @@ -6374,182 +6458,1551 @@ export namespace google { OBSOLETE = 3 } } - } - } - } - /** Namespace api. */ - namespace api { + /** Properties of a ResourceChangeTerraformInfo. */ + interface IResourceChangeTerraformInfo { - /** Properties of a Http. */ - interface IHttp { + /** ResourceChangeTerraformInfo address */ + address?: (string|null); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** ResourceChangeTerraformInfo type */ + type?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } + /** ResourceChangeTerraformInfo resourceName */ + resourceName?: (string|null); - /** Represents a Http. */ - class Http implements IHttp { + /** ResourceChangeTerraformInfo provider */ + provider?: (string|null); - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); + /** ResourceChangeTerraformInfo actions */ + actions?: (string[]|null); + } - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** Represents a ResourceChangeTerraformInfo. */ + class ResourceChangeTerraformInfo implements IResourceChangeTerraformInfo { - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** + * Constructs a new ResourceChangeTerraformInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceChangeTerraformInfo); - /** - * 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; + /** ResourceChangeTerraformInfo address. */ + public address: string; - /** - * 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; + /** ResourceChangeTerraformInfo type. */ + public type: string; - /** - * 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; + /** ResourceChangeTerraformInfo resourceName. */ + public resourceName: string; - /** - * 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; + /** ResourceChangeTerraformInfo provider. */ + public provider: string; - /** - * 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; + /** ResourceChangeTerraformInfo actions. */ + public actions: string[]; - /** - * 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 new ResourceChangeTerraformInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceChangeTerraformInfo instance + */ + public static create(properties?: google.cloud.config.v1.IResourceChangeTerraformInfo): google.cloud.config.v1.ResourceChangeTerraformInfo; - /** - * 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; + /** + * Encodes the specified ResourceChangeTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @param message ResourceChangeTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceChangeTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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 }; + /** + * Encodes the specified ResourceChangeTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @param message ResourceChangeTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceChangeTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceChangeTerraformInfo + * @throws {Error} If the payload is not 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.config.v1.ResourceChangeTerraformInfo; - /** - * 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; - } + /** + * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceChangeTerraformInfo + * @throws {Error} If the payload 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.config.v1.ResourceChangeTerraformInfo; - /** Properties of a HttpRule. */ - interface IHttpRule { + /** + * Verifies a ResourceChangeTerraformInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** HttpRule selector */ - selector?: (string|null); + /** + * Creates a ResourceChangeTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceChangeTerraformInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceChangeTerraformInfo; - /** HttpRule get */ - get?: (string|null); + /** + * Creates a plain object from a ResourceChangeTerraformInfo message. Also converts values to other types if specified. + * @param message ResourceChangeTerraformInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceChangeTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** HttpRule put */ - put?: (string|null); + /** + * Converts this ResourceChangeTerraformInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** HttpRule post */ - post?: (string|null); + /** + * Gets the default type url for ResourceChangeTerraformInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** HttpRule delete */ - "delete"?: (string|null); + /** Properties of a ResourceChange. */ + interface IResourceChange { - /** HttpRule patch */ - patch?: (string|null); + /** ResourceChange name */ + name?: (string|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** ResourceChange terraformInfo */ + terraformInfo?: (google.cloud.config.v1.IResourceChangeTerraformInfo|null); - /** HttpRule body */ - body?: (string|null); + /** ResourceChange intent */ + intent?: (google.cloud.config.v1.ResourceChange.Intent|keyof typeof google.cloud.config.v1.ResourceChange.Intent|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** ResourceChange propertyChanges */ + propertyChanges?: (google.cloud.config.v1.IPropertyChange[]|null); + } - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } + /** Represents a ResourceChange. */ + class ResourceChange implements IResourceChange { - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** + * Constructs a new ResourceChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceChange); - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); + /** ResourceChange name. */ + public name: string; - /** HttpRule selector. */ - public selector: string; + /** ResourceChange terraformInfo. */ + public terraformInfo?: (google.cloud.config.v1.IResourceChangeTerraformInfo|null); - /** HttpRule get. */ - public get?: (string|null); + /** ResourceChange intent. */ + public intent: (google.cloud.config.v1.ResourceChange.Intent|keyof typeof google.cloud.config.v1.ResourceChange.Intent); - /** HttpRule put. */ - public put?: (string|null); + /** ResourceChange propertyChanges. */ + public propertyChanges: google.cloud.config.v1.IPropertyChange[]; - /** HttpRule post. */ - public post?: (string|null); + /** + * Creates a new ResourceChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceChange instance + */ + public static create(properties?: google.cloud.config.v1.IResourceChange): google.cloud.config.v1.ResourceChange; - /** HttpRule delete. */ - public delete?: (string|null); + /** + * Encodes the specified ResourceChange message. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @param message ResourceChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceChange, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule patch. */ - public patch?: (string|null); + /** + * Encodes the specified ResourceChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @param message ResourceChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceChange, writer?: $protobuf.Writer): $protobuf.Writer; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** + * Decodes a ResourceChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceChange + * @throws {Error} If the payload is not 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.config.v1.ResourceChange; - /** HttpRule body. */ - public body: string; + /** + * Decodes a ResourceChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceChange + * @throws {Error} If the payload 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.config.v1.ResourceChange; + + /** + * Verifies a ResourceChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceChange; + + /** + * Creates a plain object from a ResourceChange message. Also converts values to other types if specified. + * @param message ResourceChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceChange { + + /** Intent enum. */ + enum Intent { + INTENT_UNSPECIFIED = 0, + CREATE = 1, + UPDATE = 2, + DELETE = 3, + RECREATE = 4, + UNCHANGED = 5 + } + } + + /** Properties of a PropertyChange. */ + interface IPropertyChange { + + /** PropertyChange path */ + path?: (string|null); + + /** PropertyChange beforeSensitivePaths */ + beforeSensitivePaths?: (string[]|null); + + /** PropertyChange before */ + before?: (google.protobuf.IValue|null); + + /** PropertyChange afterSensitivePaths */ + afterSensitivePaths?: (string[]|null); + + /** PropertyChange after */ + after?: (google.protobuf.IValue|null); + } + + /** Represents a PropertyChange. */ + class PropertyChange implements IPropertyChange { + + /** + * Constructs a new PropertyChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPropertyChange); + + /** PropertyChange path. */ + public path: string; + + /** PropertyChange beforeSensitivePaths. */ + public beforeSensitivePaths: string[]; + + /** PropertyChange before. */ + public before?: (google.protobuf.IValue|null); + + /** PropertyChange afterSensitivePaths. */ + public afterSensitivePaths: string[]; + + /** PropertyChange after. */ + public after?: (google.protobuf.IValue|null); + + /** + * Creates a new PropertyChange instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyChange instance + */ + public static create(properties?: google.cloud.config.v1.IPropertyChange): google.cloud.config.v1.PropertyChange; + + /** + * Encodes the specified PropertyChange message. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @param message PropertyChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPropertyChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @param message PropertyChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPropertyChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyChange + * @throws {Error} If the payload is not 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.config.v1.PropertyChange; + + /** + * Decodes a PropertyChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyChange + * @throws {Error} If the payload 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.config.v1.PropertyChange; + + /** + * Verifies a PropertyChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertyChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PropertyChange; + + /** + * Creates a plain object from a PropertyChange message. Also converts values to other types if specified. + * @param message PropertyChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.PropertyChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceChangesRequest. */ + interface IListResourceChangesRequest { + + /** ListResourceChangesRequest parent */ + parent?: (string|null); + + /** ListResourceChangesRequest pageSize */ + pageSize?: (number|null); + + /** ListResourceChangesRequest pageToken */ + pageToken?: (string|null); + + /** ListResourceChangesRequest filter */ + filter?: (string|null); + + /** ListResourceChangesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListResourceChangesRequest. */ + class ListResourceChangesRequest implements IListResourceChangesRequest { + + /** + * Constructs a new ListResourceChangesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceChangesRequest); + + /** ListResourceChangesRequest parent. */ + public parent: string; + + /** ListResourceChangesRequest pageSize. */ + public pageSize: number; + + /** ListResourceChangesRequest pageToken. */ + public pageToken: string; + + /** ListResourceChangesRequest filter. */ + public filter: string; + + /** ListResourceChangesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListResourceChangesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceChangesRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceChangesRequest): google.cloud.config.v1.ListResourceChangesRequest; + + /** + * Encodes the specified ListResourceChangesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @param message ListResourceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @param message ListResourceChangesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceChangesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceChangesRequest + * @throws {Error} If the payload is not 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.config.v1.ListResourceChangesRequest; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceChangesRequest + * @throws {Error} If the payload 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.config.v1.ListResourceChangesRequest; + + /** + * Verifies a ListResourceChangesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceChangesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceChangesRequest; + + /** + * Creates a plain object from a ListResourceChangesRequest message. Also converts values to other types if specified. + * @param message ListResourceChangesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceChangesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceChangesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceChangesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceChangesResponse. */ + interface IListResourceChangesResponse { + + /** ListResourceChangesResponse resourceChanges */ + resourceChanges?: (google.cloud.config.v1.IResourceChange[]|null); + + /** ListResourceChangesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListResourceChangesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListResourceChangesResponse. */ + class ListResourceChangesResponse implements IListResourceChangesResponse { + + /** + * Constructs a new ListResourceChangesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceChangesResponse); + + /** ListResourceChangesResponse resourceChanges. */ + public resourceChanges: google.cloud.config.v1.IResourceChange[]; + + /** ListResourceChangesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListResourceChangesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListResourceChangesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceChangesResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceChangesResponse): google.cloud.config.v1.ListResourceChangesResponse; + + /** + * Encodes the specified ListResourceChangesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @param message ListResourceChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceChangesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceChangesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @param message ListResourceChangesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceChangesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceChangesResponse + * @throws {Error} If the payload is not 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.config.v1.ListResourceChangesResponse; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceChangesResponse + * @throws {Error} If the payload 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.config.v1.ListResourceChangesResponse; + + /** + * Verifies a ListResourceChangesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceChangesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceChangesResponse; + + /** + * Creates a plain object from a ListResourceChangesResponse message. Also converts values to other types if specified. + * @param message ListResourceChangesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceChangesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceChangesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceChangesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetResourceChangeRequest. */ + interface IGetResourceChangeRequest { + + /** GetResourceChangeRequest name */ + name?: (string|null); + } + + /** Represents a GetResourceChangeRequest. */ + class GetResourceChangeRequest implements IGetResourceChangeRequest { + + /** + * Constructs a new GetResourceChangeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetResourceChangeRequest); + + /** GetResourceChangeRequest name. */ + public name: string; + + /** + * Creates a new GetResourceChangeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetResourceChangeRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetResourceChangeRequest): google.cloud.config.v1.GetResourceChangeRequest; + + /** + * Encodes the specified GetResourceChangeRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @param message GetResourceChangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetResourceChangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetResourceChangeRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @param message GetResourceChangeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetResourceChangeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetResourceChangeRequest + * @throws {Error} If the payload is not 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.config.v1.GetResourceChangeRequest; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetResourceChangeRequest + * @throws {Error} If the payload 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.config.v1.GetResourceChangeRequest; + + /** + * Verifies a GetResourceChangeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetResourceChangeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetResourceChangeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceChangeRequest; + + /** + * Creates a plain object from a GetResourceChangeRequest message. Also converts values to other types if specified. + * @param message GetResourceChangeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetResourceChangeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetResourceChangeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetResourceChangeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceDriftTerraformInfo. */ + interface IResourceDriftTerraformInfo { + + /** ResourceDriftTerraformInfo address */ + address?: (string|null); + + /** ResourceDriftTerraformInfo type */ + type?: (string|null); + + /** ResourceDriftTerraformInfo resourceName */ + resourceName?: (string|null); + + /** ResourceDriftTerraformInfo provider */ + provider?: (string|null); + } + + /** Represents a ResourceDriftTerraformInfo. */ + class ResourceDriftTerraformInfo implements IResourceDriftTerraformInfo { + + /** + * Constructs a new ResourceDriftTerraformInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceDriftTerraformInfo); + + /** ResourceDriftTerraformInfo address. */ + public address: string; + + /** ResourceDriftTerraformInfo type. */ + public type: string; + + /** ResourceDriftTerraformInfo resourceName. */ + public resourceName: string; + + /** ResourceDriftTerraformInfo provider. */ + public provider: string; + + /** + * Creates a new ResourceDriftTerraformInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDriftTerraformInfo instance + */ + public static create(properties?: google.cloud.config.v1.IResourceDriftTerraformInfo): google.cloud.config.v1.ResourceDriftTerraformInfo; + + /** + * Encodes the specified ResourceDriftTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @param message ResourceDriftTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceDriftTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDriftTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @param message ResourceDriftTerraformInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceDriftTerraformInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDriftTerraformInfo + * @throws {Error} If the payload is not 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.config.v1.ResourceDriftTerraformInfo; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDriftTerraformInfo + * @throws {Error} If the payload 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.config.v1.ResourceDriftTerraformInfo; + + /** + * Verifies a ResourceDriftTerraformInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDriftTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDriftTerraformInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceDriftTerraformInfo; + + /** + * Creates a plain object from a ResourceDriftTerraformInfo message. Also converts values to other types if specified. + * @param message ResourceDriftTerraformInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceDriftTerraformInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDriftTerraformInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDriftTerraformInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceDrift. */ + interface IResourceDrift { + + /** ResourceDrift name */ + name?: (string|null); + + /** ResourceDrift terraformInfo */ + terraformInfo?: (google.cloud.config.v1.IResourceDriftTerraformInfo|null); + + /** ResourceDrift propertyDrifts */ + propertyDrifts?: (google.cloud.config.v1.IPropertyDrift[]|null); + } + + /** Represents a ResourceDrift. */ + class ResourceDrift implements IResourceDrift { + + /** + * Constructs a new ResourceDrift. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IResourceDrift); + + /** ResourceDrift name. */ + public name: string; + + /** ResourceDrift terraformInfo. */ + public terraformInfo?: (google.cloud.config.v1.IResourceDriftTerraformInfo|null); + + /** ResourceDrift propertyDrifts. */ + public propertyDrifts: google.cloud.config.v1.IPropertyDrift[]; + + /** + * Creates a new ResourceDrift instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDrift instance + */ + public static create(properties?: google.cloud.config.v1.IResourceDrift): google.cloud.config.v1.ResourceDrift; + + /** + * Encodes the specified ResourceDrift message. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @param message ResourceDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IResourceDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @param message ResourceDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IResourceDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDrift + * @throws {Error} If the payload is not 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.config.v1.ResourceDrift; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDrift + * @throws {Error} If the payload 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.config.v1.ResourceDrift; + + /** + * Verifies a ResourceDrift message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDrift message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDrift + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ResourceDrift; + + /** + * Creates a plain object from a ResourceDrift message. Also converts values to other types if specified. + * @param message ResourceDrift + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ResourceDrift, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDrift to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDrift + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertyDrift. */ + interface IPropertyDrift { + + /** PropertyDrift path */ + path?: (string|null); + + /** PropertyDrift beforeSensitivePaths */ + beforeSensitivePaths?: (string[]|null); + + /** PropertyDrift before */ + before?: (google.protobuf.IValue|null); + + /** PropertyDrift afterSensitivePaths */ + afterSensitivePaths?: (string[]|null); + + /** PropertyDrift after */ + after?: (google.protobuf.IValue|null); + } + + /** Represents a PropertyDrift. */ + class PropertyDrift implements IPropertyDrift { + + /** + * Constructs a new PropertyDrift. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IPropertyDrift); + + /** PropertyDrift path. */ + public path: string; + + /** PropertyDrift beforeSensitivePaths. */ + public beforeSensitivePaths: string[]; + + /** PropertyDrift before. */ + public before?: (google.protobuf.IValue|null); + + /** PropertyDrift afterSensitivePaths. */ + public afterSensitivePaths: string[]; + + /** PropertyDrift after. */ + public after?: (google.protobuf.IValue|null); + + /** + * Creates a new PropertyDrift instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertyDrift instance + */ + public static create(properties?: google.cloud.config.v1.IPropertyDrift): google.cloud.config.v1.PropertyDrift; + + /** + * Encodes the specified PropertyDrift message. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @param message PropertyDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IPropertyDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertyDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @param message PropertyDrift message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IPropertyDrift, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertyDrift + * @throws {Error} If the payload is not 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.config.v1.PropertyDrift; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertyDrift + * @throws {Error} If the payload 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.config.v1.PropertyDrift; + + /** + * Verifies a PropertyDrift message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertyDrift message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertyDrift + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.PropertyDrift; + + /** + * Creates a plain object from a PropertyDrift message. Also converts values to other types if specified. + * @param message PropertyDrift + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.PropertyDrift, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertyDrift to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertyDrift + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceDriftsRequest. */ + interface IListResourceDriftsRequest { + + /** ListResourceDriftsRequest parent */ + parent?: (string|null); + + /** ListResourceDriftsRequest pageSize */ + pageSize?: (number|null); + + /** ListResourceDriftsRequest pageToken */ + pageToken?: (string|null); + + /** ListResourceDriftsRequest filter */ + filter?: (string|null); + + /** ListResourceDriftsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListResourceDriftsRequest. */ + class ListResourceDriftsRequest implements IListResourceDriftsRequest { + + /** + * Constructs a new ListResourceDriftsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceDriftsRequest); + + /** ListResourceDriftsRequest parent. */ + public parent: string; + + /** ListResourceDriftsRequest pageSize. */ + public pageSize: number; + + /** ListResourceDriftsRequest pageToken. */ + public pageToken: string; + + /** ListResourceDriftsRequest filter. */ + public filter: string; + + /** ListResourceDriftsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListResourceDriftsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceDriftsRequest instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceDriftsRequest): google.cloud.config.v1.ListResourceDriftsRequest; + + /** + * Encodes the specified ListResourceDriftsRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @param message ListResourceDriftsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceDriftsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceDriftsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @param message ListResourceDriftsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceDriftsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceDriftsRequest + * @throws {Error} If the payload is not 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.config.v1.ListResourceDriftsRequest; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceDriftsRequest + * @throws {Error} If the payload 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.config.v1.ListResourceDriftsRequest; + + /** + * Verifies a ListResourceDriftsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceDriftsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceDriftsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceDriftsRequest; + + /** + * Creates a plain object from a ListResourceDriftsRequest message. Also converts values to other types if specified. + * @param message ListResourceDriftsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceDriftsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceDriftsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceDriftsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListResourceDriftsResponse. */ + interface IListResourceDriftsResponse { + + /** ListResourceDriftsResponse resourceDrifts */ + resourceDrifts?: (google.cloud.config.v1.IResourceDrift[]|null); + + /** ListResourceDriftsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListResourceDriftsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListResourceDriftsResponse. */ + class ListResourceDriftsResponse implements IListResourceDriftsResponse { + + /** + * Constructs a new ListResourceDriftsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IListResourceDriftsResponse); + + /** ListResourceDriftsResponse resourceDrifts. */ + public resourceDrifts: google.cloud.config.v1.IResourceDrift[]; + + /** ListResourceDriftsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListResourceDriftsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListResourceDriftsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListResourceDriftsResponse instance + */ + public static create(properties?: google.cloud.config.v1.IListResourceDriftsResponse): google.cloud.config.v1.ListResourceDriftsResponse; + + /** + * Encodes the specified ListResourceDriftsResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @param message ListResourceDriftsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IListResourceDriftsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListResourceDriftsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @param message ListResourceDriftsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IListResourceDriftsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListResourceDriftsResponse + * @throws {Error} If the payload is not 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.config.v1.ListResourceDriftsResponse; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListResourceDriftsResponse + * @throws {Error} If the payload 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.config.v1.ListResourceDriftsResponse; + + /** + * Verifies a ListResourceDriftsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListResourceDriftsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListResourceDriftsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.ListResourceDriftsResponse; + + /** + * Creates a plain object from a ListResourceDriftsResponse message. Also converts values to other types if specified. + * @param message ListResourceDriftsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.ListResourceDriftsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListResourceDriftsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListResourceDriftsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetResourceDriftRequest. */ + interface IGetResourceDriftRequest { + + /** GetResourceDriftRequest name */ + name?: (string|null); + } + + /** Represents a GetResourceDriftRequest. */ + class GetResourceDriftRequest implements IGetResourceDriftRequest { + + /** + * Constructs a new GetResourceDriftRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.config.v1.IGetResourceDriftRequest); + + /** GetResourceDriftRequest name. */ + public name: string; + + /** + * Creates a new GetResourceDriftRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetResourceDriftRequest instance + */ + public static create(properties?: google.cloud.config.v1.IGetResourceDriftRequest): google.cloud.config.v1.GetResourceDriftRequest; + + /** + * Encodes the specified GetResourceDriftRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @param message GetResourceDriftRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.config.v1.IGetResourceDriftRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetResourceDriftRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @param message GetResourceDriftRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.config.v1.IGetResourceDriftRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetResourceDriftRequest + * @throws {Error} If the payload is not 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.config.v1.GetResourceDriftRequest; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetResourceDriftRequest + * @throws {Error} If the payload 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.config.v1.GetResourceDriftRequest; + + /** + * Verifies a GetResourceDriftRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetResourceDriftRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetResourceDriftRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.config.v1.GetResourceDriftRequest; + + /** + * Creates a plain object from a GetResourceDriftRequest message. Also converts values to other types if specified. + * @param message GetResourceDriftRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.config.v1.GetResourceDriftRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetResourceDriftRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetResourceDriftRequest + * @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; @@ -6749,6 +8202,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -6766,6 +8222,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -7466,6 +8925,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -7480,6 +8942,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -7558,6 +9023,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -7884,6 +9461,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -7898,6 +9478,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -8203,23 +9786,126 @@ export namespace google { } } - /** 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 - } + /** 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 + } + + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** LaunchStage enum. */ @@ -8252,6 +9938,9 @@ export namespace google { /** FieldInfo format */ format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + + /** FieldInfo referencedTypes */ + referencedTypes?: (google.api.ITypeReference[]|null); } /** Represents a FieldInfo. */ @@ -8266,6 +9955,9 @@ export namespace google { /** FieldInfo format. */ public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + /** FieldInfo referencedTypes. */ + public referencedTypes: google.api.ITypeReference[]; + /** * Creates a new FieldInfo instance using the specified properties. * @param [properties] Properties to set @@ -8356,6 +10048,103 @@ export namespace google { } } + /** Properties of a TypeReference. */ + interface ITypeReference { + + /** TypeReference typeName */ + typeName?: (string|null); + } + + /** Represents a TypeReference. */ + class TypeReference implements ITypeReference { + + /** + * Constructs a new TypeReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ITypeReference); + + /** TypeReference typeName. */ + public typeName: string; + + /** + * Creates a new TypeReference instance using the specified properties. + * @param [properties] Properties to set + * @returns TypeReference instance + */ + public static create(properties?: google.api.ITypeReference): google.api.TypeReference; + + /** + * Encodes the specified TypeReference message. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @param message TypeReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ITypeReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TypeReference message, length delimited. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @param message TypeReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ITypeReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TypeReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TypeReference + * @throws {Error} If the payload is not 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.TypeReference; + + /** + * Decodes a TypeReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TypeReference + * @throws {Error} If the payload 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.TypeReference; + + /** + * Verifies a TypeReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TypeReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TypeReference + */ + public static fromObject(object: { [k: string]: any }): google.api.TypeReference; + + /** + * Creates a plain object from a TypeReference message. Also converts values to other types if specified. + * @param message TypeReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.TypeReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TypeReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TypeReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { @@ -8712,6 +10501,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -8742,6 +10532,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -8791,6 +10584,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -8925,6 +10721,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -8966,6 +10765,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -9813,6 +11615,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -9839,6 +11644,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -10773,6 +12581,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -10831,6 +12642,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -11051,6 +12865,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -11289,6 +13218,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -11311,6 +13243,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -11903,6 +13838,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -11932,6 +13873,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -12054,6 +14001,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -12173,8 +14230,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -12189,8 +14249,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -12723,6 +14786,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Duration. */ interface IDuration { diff --git a/packages/google-cloud-config/protos/protos.js b/packages/google-cloud-config/protos/protos.js index 28533008e7b3..159053b08b99 100644 --- a/packages/google-cloud-config/protos/protos.js +++ b/packages/google-cloud-config/protos/protos.js @@ -857,6 +857,138 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceChanges}. + * @memberof google.cloud.config.v1.Config + * @typedef ListResourceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListResourceChangesResponse} [response] ListResourceChangesResponse + */ + + /** + * Calls ListResourceChanges. + * @function listResourceChanges + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceChangesRequest} request ListResourceChangesRequest message or plain object + * @param {google.cloud.config.v1.Config.ListResourceChangesCallback} callback Node-style callback called with the error, if any, and ListResourceChangesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listResourceChanges = function listResourceChanges(request, callback) { + return this.rpcCall(listResourceChanges, $root.google.cloud.config.v1.ListResourceChangesRequest, $root.google.cloud.config.v1.ListResourceChangesResponse, request, callback); + }, "name", { value: "ListResourceChanges" }); + + /** + * Calls ListResourceChanges. + * @function listResourceChanges + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceChangesRequest} request ListResourceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceChange}. + * @memberof google.cloud.config.v1.Config + * @typedef GetResourceChangeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ResourceChange} [response] ResourceChange + */ + + /** + * Calls GetResourceChange. + * @function getResourceChange + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceChangeRequest} request GetResourceChangeRequest message or plain object + * @param {google.cloud.config.v1.Config.GetResourceChangeCallback} callback Node-style callback called with the error, if any, and ResourceChange + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getResourceChange = function getResourceChange(request, callback) { + return this.rpcCall(getResourceChange, $root.google.cloud.config.v1.GetResourceChangeRequest, $root.google.cloud.config.v1.ResourceChange, request, callback); + }, "name", { value: "GetResourceChange" }); + + /** + * Calls GetResourceChange. + * @function getResourceChange + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceChangeRequest} request GetResourceChangeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|listResourceDrifts}. + * @memberof google.cloud.config.v1.Config + * @typedef ListResourceDriftsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ListResourceDriftsResponse} [response] ListResourceDriftsResponse + */ + + /** + * Calls ListResourceDrifts. + * @function listResourceDrifts + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceDriftsRequest} request ListResourceDriftsRequest message or plain object + * @param {google.cloud.config.v1.Config.ListResourceDriftsCallback} callback Node-style callback called with the error, if any, and ListResourceDriftsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.listResourceDrifts = function listResourceDrifts(request, callback) { + return this.rpcCall(listResourceDrifts, $root.google.cloud.config.v1.ListResourceDriftsRequest, $root.google.cloud.config.v1.ListResourceDriftsResponse, request, callback); + }, "name", { value: "ListResourceDrifts" }); + + /** + * Calls ListResourceDrifts. + * @function listResourceDrifts + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IListResourceDriftsRequest} request ListResourceDriftsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.config.v1.Config|getResourceDrift}. + * @memberof google.cloud.config.v1.Config + * @typedef GetResourceDriftCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.config.v1.ResourceDrift} [response] ResourceDrift + */ + + /** + * Calls GetResourceDrift. + * @function getResourceDrift + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceDriftRequest} request GetResourceDriftRequest message or plain object + * @param {google.cloud.config.v1.Config.GetResourceDriftCallback} callback Node-style callback called with the error, if any, and ResourceDrift + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Config.prototype.getResourceDrift = function getResourceDrift(request, callback) { + return this.rpcCall(getResourceDrift, $root.google.cloud.config.v1.GetResourceDriftRequest, $root.google.cloud.config.v1.ResourceDrift, request, callback); + }, "name", { value: "GetResourceDrift" }); + + /** + * Calls GetResourceDrift. + * @function getResourceDrift + * @memberof google.cloud.config.v1.Config + * @instance + * @param {google.cloud.config.v1.IGetResourceDriftRequest} request GetResourceDriftRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Config; })(); @@ -16351,275 +16483,3777 @@ return TerraformVersion; })(); - return v1; - })(); + v1.ResourceChangeTerraformInfo = (function() { - return config; - })(); + /** + * Properties of a ResourceChangeTerraformInfo. + * @memberof google.cloud.config.v1 + * @interface IResourceChangeTerraformInfo + * @property {string|null} [address] ResourceChangeTerraformInfo address + * @property {string|null} [type] ResourceChangeTerraformInfo type + * @property {string|null} [resourceName] ResourceChangeTerraformInfo resourceName + * @property {string|null} [provider] ResourceChangeTerraformInfo provider + * @property {Array.|null} [actions] ResourceChangeTerraformInfo actions + */ - return cloud; - })(); + /** + * Constructs a new ResourceChangeTerraformInfo. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceChangeTerraformInfo. + * @implements IResourceChangeTerraformInfo + * @constructor + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo=} [properties] Properties to set + */ + function ResourceChangeTerraformInfo(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - google.api = (function() { + /** + * ResourceChangeTerraformInfo address. + * @member {string} address + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.address = ""; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * ResourceChangeTerraformInfo type. + * @member {string} type + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.type = ""; - api.Http = (function() { + /** + * ResourceChangeTerraformInfo resourceName. + * @member {string} resourceName + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.resourceName = ""; - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ + /** + * ResourceChangeTerraformInfo provider. + * @member {string} provider + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.provider = ""; - /** - * 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]]; - } + /** + * ResourceChangeTerraformInfo actions. + * @member {Array.} actions + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + */ + ResourceChangeTerraformInfo.prototype.actions = $util.emptyArray; - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; + /** + * Creates a new ResourceChangeTerraformInfo instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo instance + */ + ResourceChangeTerraformInfo.create = function create(properties) { + return new ResourceChangeTerraformInfo(properties); + }; - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; + /** + * Encodes the specified ResourceChangeTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo} message ResourceChangeTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChangeTerraformInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.provider); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.actions[i]); + return writer; + }; - /** - * 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 ResourceChangeTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChangeTerraformInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceChangeTerraformInfo} message ResourceChangeTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChangeTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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; - }; + /** + * Decodes a ResourceChangeTerraformInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChangeTerraformInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceChangeTerraformInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.resourceName = reader.string(); + break; + } + case 4: { + message.provider = reader.string(); + break; + } + case 5: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * 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 ResourceChangeTerraformInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChangeTerraformInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; + /** + * Verifies a ResourceChangeTerraformInfo message. + * @function verify + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceChangeTerraformInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) + if (!$util.isString(message.actions[i])) + return "actions: string[] expected"; } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; + return null; + }; + + /** + * Creates a ResourceChangeTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceChangeTerraformInfo} ResourceChangeTerraformInfo + */ + ResourceChangeTerraformInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceChangeTerraformInfo) + return object; + var message = new $root.google.cloud.config.v1.ResourceChangeTerraformInfo(); + if (object.address != null) + message.address = String(object.address); + if (object.type != null) + message.type = String(object.type); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.provider != null) + message.provider = String(object.provider); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.cloud.config.v1.ResourceChangeTerraformInfo.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) + message.actions[i] = String(object.actions[i]); } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + 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()); - }; + /** + * Creates a plain object from a ResourceChangeTerraformInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {google.cloud.config.v1.ResourceChangeTerraformInfo} message ResourceChangeTerraformInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceChangeTerraformInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) { + object.address = ""; + object.type = ""; + object.resourceName = ""; + object.provider = ""; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = message.actions[j]; + } + return object; + }; - /** - * 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; - }; + /** + * Converts this ResourceChangeTerraformInfo to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceChangeTerraformInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - }; + /** + * Gets the default type url for ResourceChangeTerraformInfo + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceChangeTerraformInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceChangeTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceChangeTerraformInfo"; + }; - /** - * 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; - }; + return ResourceChangeTerraformInfo; + })(); - /** - * 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); - }; + v1.ResourceChange = (function() { - /** - * 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"; - }; + /** + * Properties of a ResourceChange. + * @memberof google.cloud.config.v1 + * @interface IResourceChange + * @property {string|null} [name] ResourceChange name + * @property {google.cloud.config.v1.IResourceChangeTerraformInfo|null} [terraformInfo] ResourceChange terraformInfo + * @property {google.cloud.config.v1.ResourceChange.Intent|null} [intent] ResourceChange intent + * @property {Array.|null} [propertyChanges] ResourceChange propertyChanges + */ - return Http; - })(); + /** + * Constructs a new ResourceChange. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceChange. + * @implements IResourceChange + * @constructor + * @param {google.cloud.config.v1.IResourceChange=} [properties] Properties to set + */ + function ResourceChange(properties) { + this.propertyChanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - api.HttpRule = (function() { + /** + * ResourceChange name. + * @member {string} name + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.name = ""; + + /** + * ResourceChange terraformInfo. + * @member {google.cloud.config.v1.IResourceChangeTerraformInfo|null|undefined} terraformInfo + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.terraformInfo = null; + + /** + * ResourceChange intent. + * @member {google.cloud.config.v1.ResourceChange.Intent} intent + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.intent = 0; + + /** + * ResourceChange propertyChanges. + * @member {Array.} propertyChanges + * @memberof google.cloud.config.v1.ResourceChange + * @instance + */ + ResourceChange.prototype.propertyChanges = $util.emptyArray; + + /** + * Creates a new ResourceChange instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.IResourceChange=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange instance + */ + ResourceChange.create = function create(properties) { + return new ResourceChange(properties); + }; + + /** + * Encodes the specified ResourceChange message. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.IResourceChange} message ResourceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) + $root.google.cloud.config.v1.ResourceChangeTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.intent != null && Object.hasOwnProperty.call(message, "intent")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.intent); + if (message.propertyChanges != null && message.propertyChanges.length) + for (var i = 0; i < message.propertyChanges.length; ++i) + $root.google.cloud.config.v1.PropertyChange.encode(message.propertyChanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.IResourceChange} message ResourceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.intent = reader.int32(); + break; + } + case 4: { + if (!(message.propertyChanges && message.propertyChanges.length)) + message.propertyChanges = []; + message.propertyChanges.push($root.google.cloud.config.v1.PropertyChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceChange message. + * @function verify + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceChange.verify = function verify(message) { + if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { + var error = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.verify(message.terraformInfo); + if (error) + return "terraformInfo." + error; + } + if (message.intent != null && message.hasOwnProperty("intent")) + switch (message.intent) { + default: + return "intent: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.propertyChanges != null && message.hasOwnProperty("propertyChanges")) { + if (!Array.isArray(message.propertyChanges)) + return "propertyChanges: array expected"; + for (var i = 0; i < message.propertyChanges.length; ++i) { + var error = $root.google.cloud.config.v1.PropertyChange.verify(message.propertyChanges[i]); + if (error) + return "propertyChanges." + error; + } + } + return null; + }; + + /** + * Creates a ResourceChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceChange} ResourceChange + */ + ResourceChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceChange) + return object; + var message = new $root.google.cloud.config.v1.ResourceChange(); + if (object.name != null) + message.name = String(object.name); + if (object.terraformInfo != null) { + if (typeof object.terraformInfo !== "object") + throw TypeError(".google.cloud.config.v1.ResourceChange.terraformInfo: object expected"); + message.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.fromObject(object.terraformInfo); + } + switch (object.intent) { + default: + if (typeof object.intent === "number") { + message.intent = object.intent; + break; + } + break; + case "INTENT_UNSPECIFIED": + case 0: + message.intent = 0; + break; + case "CREATE": + case 1: + message.intent = 1; + break; + case "UPDATE": + case 2: + message.intent = 2; + break; + case "DELETE": + case 3: + message.intent = 3; + break; + case "RECREATE": + case 4: + message.intent = 4; + break; + case "UNCHANGED": + case 5: + message.intent = 5; + break; + } + if (object.propertyChanges) { + if (!Array.isArray(object.propertyChanges)) + throw TypeError(".google.cloud.config.v1.ResourceChange.propertyChanges: array expected"); + message.propertyChanges = []; + for (var i = 0; i < object.propertyChanges.length; ++i) { + if (typeof object.propertyChanges[i] !== "object") + throw TypeError(".google.cloud.config.v1.ResourceChange.propertyChanges: object expected"); + message.propertyChanges[i] = $root.google.cloud.config.v1.PropertyChange.fromObject(object.propertyChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {google.cloud.config.v1.ResourceChange} message ResourceChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.propertyChanges = []; + if (options.defaults) { + object.name = ""; + object.terraformInfo = null; + object.intent = options.enums === String ? "INTENT_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) + object.terraformInfo = $root.google.cloud.config.v1.ResourceChangeTerraformInfo.toObject(message.terraformInfo, options); + if (message.intent != null && message.hasOwnProperty("intent")) + object.intent = options.enums === String ? $root.google.cloud.config.v1.ResourceChange.Intent[message.intent] === undefined ? message.intent : $root.google.cloud.config.v1.ResourceChange.Intent[message.intent] : message.intent; + if (message.propertyChanges && message.propertyChanges.length) { + object.propertyChanges = []; + for (var j = 0; j < message.propertyChanges.length; ++j) + object.propertyChanges[j] = $root.google.cloud.config.v1.PropertyChange.toObject(message.propertyChanges[j], options); + } + return object; + }; + + /** + * Converts this ResourceChange to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceChange + * @instance + * @returns {Object.} JSON object + */ + ResourceChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceChange + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceChange"; + }; + + /** + * Intent enum. + * @name google.cloud.config.v1.ResourceChange.Intent + * @enum {number} + * @property {number} INTENT_UNSPECIFIED=0 INTENT_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} UPDATE=2 UPDATE value + * @property {number} DELETE=3 DELETE value + * @property {number} RECREATE=4 RECREATE value + * @property {number} UNCHANGED=5 UNCHANGED value + */ + ResourceChange.Intent = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INTENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "UPDATE"] = 2; + values[valuesById[3] = "DELETE"] = 3; + values[valuesById[4] = "RECREATE"] = 4; + values[valuesById[5] = "UNCHANGED"] = 5; + return values; + })(); + + return ResourceChange; + })(); + + v1.PropertyChange = (function() { + + /** + * Properties of a PropertyChange. + * @memberof google.cloud.config.v1 + * @interface IPropertyChange + * @property {string|null} [path] PropertyChange path + * @property {Array.|null} [beforeSensitivePaths] PropertyChange beforeSensitivePaths + * @property {google.protobuf.IValue|null} [before] PropertyChange before + * @property {Array.|null} [afterSensitivePaths] PropertyChange afterSensitivePaths + * @property {google.protobuf.IValue|null} [after] PropertyChange after + */ + + /** + * Constructs a new PropertyChange. + * @memberof google.cloud.config.v1 + * @classdesc Represents a PropertyChange. + * @implements IPropertyChange + * @constructor + * @param {google.cloud.config.v1.IPropertyChange=} [properties] Properties to set + */ + function PropertyChange(properties) { + this.beforeSensitivePaths = []; + this.afterSensitivePaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertyChange path. + * @member {string} path + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.path = ""; + + /** + * PropertyChange beforeSensitivePaths. + * @member {Array.} beforeSensitivePaths + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.beforeSensitivePaths = $util.emptyArray; + + /** + * PropertyChange before. + * @member {google.protobuf.IValue|null|undefined} before + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.before = null; + + /** + * PropertyChange afterSensitivePaths. + * @member {Array.} afterSensitivePaths + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.afterSensitivePaths = $util.emptyArray; + + /** + * PropertyChange after. + * @member {google.protobuf.IValue|null|undefined} after + * @memberof google.cloud.config.v1.PropertyChange + * @instance + */ + PropertyChange.prototype.after = null; + + /** + * Creates a new PropertyChange instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.IPropertyChange=} [properties] Properties to set + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange instance + */ + PropertyChange.create = function create(properties) { + return new PropertyChange(properties); + }; + + /** + * Encodes the specified PropertyChange message. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.IPropertyChange} message PropertyChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.beforeSensitivePaths != null && message.beforeSensitivePaths.length) + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.beforeSensitivePaths[i]); + if (message.before != null && Object.hasOwnProperty.call(message, "before")) + $root.google.protobuf.Value.encode(message.before, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.afterSensitivePaths != null && message.afterSensitivePaths.length) + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.afterSensitivePaths[i]); + if (message.after != null && Object.hasOwnProperty.call(message, "after")) + $root.google.protobuf.Value.encode(message.after, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyChange message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.IPropertyChange} message PropertyChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyChange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PropertyChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + if (!(message.beforeSensitivePaths && message.beforeSensitivePaths.length)) + message.beforeSensitivePaths = []; + message.beforeSensitivePaths.push(reader.string()); + break; + } + case 3: { + message.before = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.afterSensitivePaths && message.afterSensitivePaths.length)) + message.afterSensitivePaths = []; + message.afterSensitivePaths.push(reader.string()); + break; + } + case 5: { + message.after = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyChange message. + * @function verify + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.beforeSensitivePaths != null && message.hasOwnProperty("beforeSensitivePaths")) { + if (!Array.isArray(message.beforeSensitivePaths)) + return "beforeSensitivePaths: array expected"; + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + if (!$util.isString(message.beforeSensitivePaths[i])) + return "beforeSensitivePaths: string[] expected"; + } + if (message.before != null && message.hasOwnProperty("before")) { + var error = $root.google.protobuf.Value.verify(message.before); + if (error) + return "before." + error; + } + if (message.afterSensitivePaths != null && message.hasOwnProperty("afterSensitivePaths")) { + if (!Array.isArray(message.afterSensitivePaths)) + return "afterSensitivePaths: array expected"; + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + if (!$util.isString(message.afterSensitivePaths[i])) + return "afterSensitivePaths: string[] expected"; + } + if (message.after != null && message.hasOwnProperty("after")) { + var error = $root.google.protobuf.Value.verify(message.after); + if (error) + return "after." + error; + } + return null; + }; + + /** + * Creates a PropertyChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.PropertyChange} PropertyChange + */ + PropertyChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.PropertyChange) + return object; + var message = new $root.google.cloud.config.v1.PropertyChange(); + if (object.path != null) + message.path = String(object.path); + if (object.beforeSensitivePaths) { + if (!Array.isArray(object.beforeSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyChange.beforeSensitivePaths: array expected"); + message.beforeSensitivePaths = []; + for (var i = 0; i < object.beforeSensitivePaths.length; ++i) + message.beforeSensitivePaths[i] = String(object.beforeSensitivePaths[i]); + } + if (object.before != null) { + if (typeof object.before !== "object") + throw TypeError(".google.cloud.config.v1.PropertyChange.before: object expected"); + message.before = $root.google.protobuf.Value.fromObject(object.before); + } + if (object.afterSensitivePaths) { + if (!Array.isArray(object.afterSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyChange.afterSensitivePaths: array expected"); + message.afterSensitivePaths = []; + for (var i = 0; i < object.afterSensitivePaths.length; ++i) + message.afterSensitivePaths[i] = String(object.afterSensitivePaths[i]); + } + if (object.after != null) { + if (typeof object.after !== "object") + throw TypeError(".google.cloud.config.v1.PropertyChange.after: object expected"); + message.after = $root.google.protobuf.Value.fromObject(object.after); + } + return message; + }; + + /** + * Creates a plain object from a PropertyChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {google.cloud.config.v1.PropertyChange} message PropertyChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.beforeSensitivePaths = []; + object.afterSensitivePaths = []; + } + if (options.defaults) { + object.path = ""; + object.before = null; + object.after = null; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.beforeSensitivePaths && message.beforeSensitivePaths.length) { + object.beforeSensitivePaths = []; + for (var j = 0; j < message.beforeSensitivePaths.length; ++j) + object.beforeSensitivePaths[j] = message.beforeSensitivePaths[j]; + } + if (message.before != null && message.hasOwnProperty("before")) + object.before = $root.google.protobuf.Value.toObject(message.before, options); + if (message.afterSensitivePaths && message.afterSensitivePaths.length) { + object.afterSensitivePaths = []; + for (var j = 0; j < message.afterSensitivePaths.length; ++j) + object.afterSensitivePaths[j] = message.afterSensitivePaths[j]; + } + if (message.after != null && message.hasOwnProperty("after")) + object.after = $root.google.protobuf.Value.toObject(message.after, options); + return object; + }; + + /** + * Converts this PropertyChange to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.PropertyChange + * @instance + * @returns {Object.} JSON object + */ + PropertyChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyChange + * @function getTypeUrl + * @memberof google.cloud.config.v1.PropertyChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.PropertyChange"; + }; + + return PropertyChange; + })(); + + v1.ListResourceChangesRequest = (function() { + + /** + * Properties of a ListResourceChangesRequest. + * @memberof google.cloud.config.v1 + * @interface IListResourceChangesRequest + * @property {string|null} [parent] ListResourceChangesRequest parent + * @property {number|null} [pageSize] ListResourceChangesRequest pageSize + * @property {string|null} [pageToken] ListResourceChangesRequest pageToken + * @property {string|null} [filter] ListResourceChangesRequest filter + * @property {string|null} [orderBy] ListResourceChangesRequest orderBy + */ + + /** + * Constructs a new ListResourceChangesRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceChangesRequest. + * @implements IListResourceChangesRequest + * @constructor + * @param {google.cloud.config.v1.IListResourceChangesRequest=} [properties] Properties to set + */ + function ListResourceChangesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceChangesRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.parent = ""; + + /** + * ListResourceChangesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.pageSize = 0; + + /** + * ListResourceChangesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.pageToken = ""; + + /** + * ListResourceChangesRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.filter = ""; + + /** + * ListResourceChangesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + */ + ListResourceChangesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListResourceChangesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.IListResourceChangesRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest instance + */ + ListResourceChangesRequest.create = function create(properties) { + return new ListResourceChangesRequest(properties); + }; + + /** + * Encodes the specified ListResourceChangesRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.IListResourceChangesRequest} message ListResourceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListResourceChangesRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.IListResourceChangesRequest} message ListResourceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceChangesRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceChangesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListResourceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceChangesRequest} ListResourceChangesRequest + */ + ListResourceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceChangesRequest) + return object; + var message = new $root.google.cloud.config.v1.ListResourceChangesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListResourceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {google.cloud.config.v1.ListResourceChangesRequest} message ListResourceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceChangesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListResourceChangesRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + ListResourceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceChangesRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceChangesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceChangesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceChangesRequest"; + }; + + return ListResourceChangesRequest; + })(); + + v1.ListResourceChangesResponse = (function() { + + /** + * Properties of a ListResourceChangesResponse. + * @memberof google.cloud.config.v1 + * @interface IListResourceChangesResponse + * @property {Array.|null} [resourceChanges] ListResourceChangesResponse resourceChanges + * @property {string|null} [nextPageToken] ListResourceChangesResponse nextPageToken + * @property {Array.|null} [unreachable] ListResourceChangesResponse unreachable + */ + + /** + * Constructs a new ListResourceChangesResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceChangesResponse. + * @implements IListResourceChangesResponse + * @constructor + * @param {google.cloud.config.v1.IListResourceChangesResponse=} [properties] Properties to set + */ + function ListResourceChangesResponse(properties) { + this.resourceChanges = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceChangesResponse resourceChanges. + * @member {Array.} resourceChanges + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + */ + ListResourceChangesResponse.prototype.resourceChanges = $util.emptyArray; + + /** + * ListResourceChangesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + */ + ListResourceChangesResponse.prototype.nextPageToken = ""; + + /** + * ListResourceChangesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + */ + ListResourceChangesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListResourceChangesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.IListResourceChangesResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse instance + */ + ListResourceChangesResponse.create = function create(properties) { + return new ListResourceChangesResponse(properties); + }; + + /** + * Encodes the specified ListResourceChangesResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.IListResourceChangesResponse} message ListResourceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceChanges != null && message.resourceChanges.length) + for (var i = 0; i < message.resourceChanges.length; ++i) + $root.google.cloud.config.v1.ResourceChange.encode(message.resourceChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListResourceChangesResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.IListResourceChangesResponse} message ListResourceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceChangesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceChangesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.resourceChanges && message.resourceChanges.length)) + message.resourceChanges = []; + message.resourceChanges.push($root.google.cloud.config.v1.ResourceChange.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceChangesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceChangesResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceChangesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceChanges != null && message.hasOwnProperty("resourceChanges")) { + if (!Array.isArray(message.resourceChanges)) + return "resourceChanges: array expected"; + for (var i = 0; i < message.resourceChanges.length; ++i) { + var error = $root.google.cloud.config.v1.ResourceChange.verify(message.resourceChanges[i]); + if (error) + return "resourceChanges." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListResourceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceChangesResponse} ListResourceChangesResponse + */ + ListResourceChangesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceChangesResponse) + return object; + var message = new $root.google.cloud.config.v1.ListResourceChangesResponse(); + if (object.resourceChanges) { + if (!Array.isArray(object.resourceChanges)) + throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.resourceChanges: array expected"); + message.resourceChanges = []; + for (var i = 0; i < object.resourceChanges.length; ++i) { + if (typeof object.resourceChanges[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.resourceChanges: object expected"); + message.resourceChanges[i] = $root.google.cloud.config.v1.ResourceChange.fromObject(object.resourceChanges[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListResourceChangesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListResourceChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {google.cloud.config.v1.ListResourceChangesResponse} message ListResourceChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceChangesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceChanges = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceChanges && message.resourceChanges.length) { + object.resourceChanges = []; + for (var j = 0; j < message.resourceChanges.length; ++j) + object.resourceChanges[j] = $root.google.cloud.config.v1.ResourceChange.toObject(message.resourceChanges[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListResourceChangesResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @instance + * @returns {Object.} JSON object + */ + ListResourceChangesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceChangesResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceChangesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceChangesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceChangesResponse"; + }; + + return ListResourceChangesResponse; + })(); + + v1.GetResourceChangeRequest = (function() { + + /** + * Properties of a GetResourceChangeRequest. + * @memberof google.cloud.config.v1 + * @interface IGetResourceChangeRequest + * @property {string|null} [name] GetResourceChangeRequest name + */ + + /** + * Constructs a new GetResourceChangeRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetResourceChangeRequest. + * @implements IGetResourceChangeRequest + * @constructor + * @param {google.cloud.config.v1.IGetResourceChangeRequest=} [properties] Properties to set + */ + function GetResourceChangeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetResourceChangeRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @instance + */ + GetResourceChangeRequest.prototype.name = ""; + + /** + * Creates a new GetResourceChangeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.IGetResourceChangeRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest instance + */ + GetResourceChangeRequest.create = function create(properties) { + return new GetResourceChangeRequest(properties); + }; + + /** + * Encodes the specified GetResourceChangeRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.IGetResourceChangeRequest} message GetResourceChangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceChangeRequest.encode = function encode(message, writer) { + 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 GetResourceChangeRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceChangeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.IGetResourceChangeRequest} message GetResourceChangeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceChangeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceChangeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceChangeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetResourceChangeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceChangeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetResourceChangeRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetResourceChangeRequest.verify = function verify(message) { + if (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 GetResourceChangeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetResourceChangeRequest} GetResourceChangeRequest + */ + GetResourceChangeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetResourceChangeRequest) + return object; + var message = new $root.google.cloud.config.v1.GetResourceChangeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetResourceChangeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {google.cloud.config.v1.GetResourceChangeRequest} message GetResourceChangeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetResourceChangeRequest.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 GetResourceChangeRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @instance + * @returns {Object.} JSON object + */ + GetResourceChangeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetResourceChangeRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetResourceChangeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetResourceChangeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetResourceChangeRequest"; + }; + + return GetResourceChangeRequest; + })(); + + v1.ResourceDriftTerraformInfo = (function() { + + /** + * Properties of a ResourceDriftTerraformInfo. + * @memberof google.cloud.config.v1 + * @interface IResourceDriftTerraformInfo + * @property {string|null} [address] ResourceDriftTerraformInfo address + * @property {string|null} [type] ResourceDriftTerraformInfo type + * @property {string|null} [resourceName] ResourceDriftTerraformInfo resourceName + * @property {string|null} [provider] ResourceDriftTerraformInfo provider + */ + + /** + * Constructs a new ResourceDriftTerraformInfo. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceDriftTerraformInfo. + * @implements IResourceDriftTerraformInfo + * @constructor + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo=} [properties] Properties to set + */ + function ResourceDriftTerraformInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDriftTerraformInfo address. + * @member {string} address + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.address = ""; + + /** + * ResourceDriftTerraformInfo type. + * @member {string} type + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.type = ""; + + /** + * ResourceDriftTerraformInfo resourceName. + * @member {string} resourceName + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.resourceName = ""; + + /** + * ResourceDriftTerraformInfo provider. + * @member {string} provider + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + */ + ResourceDriftTerraformInfo.prototype.provider = ""; + + /** + * Creates a new ResourceDriftTerraformInfo instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo instance + */ + ResourceDriftTerraformInfo.create = function create(properties) { + return new ResourceDriftTerraformInfo(properties); + }; + + /** + * Encodes the specified ResourceDriftTerraformInfo message. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo} message ResourceDriftTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDriftTerraformInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resourceName); + if (message.provider != null && Object.hasOwnProperty.call(message, "provider")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.provider); + return writer; + }; + + /** + * Encodes the specified ResourceDriftTerraformInfo message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDriftTerraformInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.IResourceDriftTerraformInfo} message ResourceDriftTerraformInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDriftTerraformInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDriftTerraformInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceDriftTerraformInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.address = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.resourceName = reader.string(); + break; + } + case 4: { + message.provider = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDriftTerraformInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDriftTerraformInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDriftTerraformInfo message. + * @function verify + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDriftTerraformInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!$util.isString(message.address)) + return "address: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.provider != null && message.hasOwnProperty("provider")) + if (!$util.isString(message.provider)) + return "provider: string expected"; + return null; + }; + + /** + * Creates a ResourceDriftTerraformInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceDriftTerraformInfo} ResourceDriftTerraformInfo + */ + ResourceDriftTerraformInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceDriftTerraformInfo) + return object; + var message = new $root.google.cloud.config.v1.ResourceDriftTerraformInfo(); + if (object.address != null) + message.address = String(object.address); + if (object.type != null) + message.type = String(object.type); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.provider != null) + message.provider = String(object.provider); + return message; + }; + + /** + * Creates a plain object from a ResourceDriftTerraformInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {google.cloud.config.v1.ResourceDriftTerraformInfo} message ResourceDriftTerraformInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDriftTerraformInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.address = ""; + object.type = ""; + object.resourceName = ""; + object.provider = ""; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = message.address; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.provider != null && message.hasOwnProperty("provider")) + object.provider = message.provider; + return object; + }; + + /** + * Converts this ResourceDriftTerraformInfo to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceDriftTerraformInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDriftTerraformInfo + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceDriftTerraformInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDriftTerraformInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceDriftTerraformInfo"; + }; + + return ResourceDriftTerraformInfo; + })(); + + v1.ResourceDrift = (function() { + + /** + * Properties of a ResourceDrift. + * @memberof google.cloud.config.v1 + * @interface IResourceDrift + * @property {string|null} [name] ResourceDrift name + * @property {google.cloud.config.v1.IResourceDriftTerraformInfo|null} [terraformInfo] ResourceDrift terraformInfo + * @property {Array.|null} [propertyDrifts] ResourceDrift propertyDrifts + */ + + /** + * Constructs a new ResourceDrift. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ResourceDrift. + * @implements IResourceDrift + * @constructor + * @param {google.cloud.config.v1.IResourceDrift=} [properties] Properties to set + */ + function ResourceDrift(properties) { + this.propertyDrifts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDrift name. + * @member {string} name + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + */ + ResourceDrift.prototype.name = ""; + + /** + * ResourceDrift terraformInfo. + * @member {google.cloud.config.v1.IResourceDriftTerraformInfo|null|undefined} terraformInfo + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + */ + ResourceDrift.prototype.terraformInfo = null; + + /** + * ResourceDrift propertyDrifts. + * @member {Array.} propertyDrifts + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + */ + ResourceDrift.prototype.propertyDrifts = $util.emptyArray; + + /** + * Creates a new ResourceDrift instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.IResourceDrift=} [properties] Properties to set + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift instance + */ + ResourceDrift.create = function create(properties) { + return new ResourceDrift(properties); + }; + + /** + * Encodes the specified ResourceDrift message. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.IResourceDrift} message ResourceDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDrift.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.terraformInfo != null && Object.hasOwnProperty.call(message, "terraformInfo")) + $root.google.cloud.config.v1.ResourceDriftTerraformInfo.encode(message.terraformInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.propertyDrifts != null && message.propertyDrifts.length) + for (var i = 0; i < message.propertyDrifts.length; ++i) + $root.google.cloud.config.v1.PropertyDrift.encode(message.propertyDrifts[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResourceDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.ResourceDrift.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.IResourceDrift} message ResourceDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDrift.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDrift.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ResourceDrift(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.propertyDrifts && message.propertyDrifts.length)) + message.propertyDrifts = []; + message.propertyDrifts.push($root.google.cloud.config.v1.PropertyDrift.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDrift message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDrift.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDrift message. + * @function verify + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDrift.verify = function verify(message) { + if (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.terraformInfo != null && message.hasOwnProperty("terraformInfo")) { + var error = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.verify(message.terraformInfo); + if (error) + return "terraformInfo." + error; + } + if (message.propertyDrifts != null && message.hasOwnProperty("propertyDrifts")) { + if (!Array.isArray(message.propertyDrifts)) + return "propertyDrifts: array expected"; + for (var i = 0; i < message.propertyDrifts.length; ++i) { + var error = $root.google.cloud.config.v1.PropertyDrift.verify(message.propertyDrifts[i]); + if (error) + return "propertyDrifts." + error; + } + } + return null; + }; + + /** + * Creates a ResourceDrift message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ResourceDrift} ResourceDrift + */ + ResourceDrift.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ResourceDrift) + return object; + var message = new $root.google.cloud.config.v1.ResourceDrift(); + if (object.name != null) + message.name = String(object.name); + if (object.terraformInfo != null) { + if (typeof object.terraformInfo !== "object") + throw TypeError(".google.cloud.config.v1.ResourceDrift.terraformInfo: object expected"); + message.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.fromObject(object.terraformInfo); + } + if (object.propertyDrifts) { + if (!Array.isArray(object.propertyDrifts)) + throw TypeError(".google.cloud.config.v1.ResourceDrift.propertyDrifts: array expected"); + message.propertyDrifts = []; + for (var i = 0; i < object.propertyDrifts.length; ++i) { + if (typeof object.propertyDrifts[i] !== "object") + throw TypeError(".google.cloud.config.v1.ResourceDrift.propertyDrifts: object expected"); + message.propertyDrifts[i] = $root.google.cloud.config.v1.PropertyDrift.fromObject(object.propertyDrifts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDrift message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {google.cloud.config.v1.ResourceDrift} message ResourceDrift + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDrift.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.propertyDrifts = []; + if (options.defaults) { + object.name = ""; + object.terraformInfo = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.terraformInfo != null && message.hasOwnProperty("terraformInfo")) + object.terraformInfo = $root.google.cloud.config.v1.ResourceDriftTerraformInfo.toObject(message.terraformInfo, options); + if (message.propertyDrifts && message.propertyDrifts.length) { + object.propertyDrifts = []; + for (var j = 0; j < message.propertyDrifts.length; ++j) + object.propertyDrifts[j] = $root.google.cloud.config.v1.PropertyDrift.toObject(message.propertyDrifts[j], options); + } + return object; + }; + + /** + * Converts this ResourceDrift to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ResourceDrift + * @instance + * @returns {Object.} JSON object + */ + ResourceDrift.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDrift + * @function getTypeUrl + * @memberof google.cloud.config.v1.ResourceDrift + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDrift.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ResourceDrift"; + }; + + return ResourceDrift; + })(); + + v1.PropertyDrift = (function() { + + /** + * Properties of a PropertyDrift. + * @memberof google.cloud.config.v1 + * @interface IPropertyDrift + * @property {string|null} [path] PropertyDrift path + * @property {Array.|null} [beforeSensitivePaths] PropertyDrift beforeSensitivePaths + * @property {google.protobuf.IValue|null} [before] PropertyDrift before + * @property {Array.|null} [afterSensitivePaths] PropertyDrift afterSensitivePaths + * @property {google.protobuf.IValue|null} [after] PropertyDrift after + */ + + /** + * Constructs a new PropertyDrift. + * @memberof google.cloud.config.v1 + * @classdesc Represents a PropertyDrift. + * @implements IPropertyDrift + * @constructor + * @param {google.cloud.config.v1.IPropertyDrift=} [properties] Properties to set + */ + function PropertyDrift(properties) { + this.beforeSensitivePaths = []; + this.afterSensitivePaths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertyDrift path. + * @member {string} path + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.path = ""; + + /** + * PropertyDrift beforeSensitivePaths. + * @member {Array.} beforeSensitivePaths + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.beforeSensitivePaths = $util.emptyArray; + + /** + * PropertyDrift before. + * @member {google.protobuf.IValue|null|undefined} before + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.before = null; + + /** + * PropertyDrift afterSensitivePaths. + * @member {Array.} afterSensitivePaths + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.afterSensitivePaths = $util.emptyArray; + + /** + * PropertyDrift after. + * @member {google.protobuf.IValue|null|undefined} after + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + */ + PropertyDrift.prototype.after = null; + + /** + * Creates a new PropertyDrift instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.IPropertyDrift=} [properties] Properties to set + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift instance + */ + PropertyDrift.create = function create(properties) { + return new PropertyDrift(properties); + }; + + /** + * Encodes the specified PropertyDrift message. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.IPropertyDrift} message PropertyDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyDrift.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.beforeSensitivePaths != null && message.beforeSensitivePaths.length) + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.beforeSensitivePaths[i]); + if (message.before != null && Object.hasOwnProperty.call(message, "before")) + $root.google.protobuf.Value.encode(message.before, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.afterSensitivePaths != null && message.afterSensitivePaths.length) + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.afterSensitivePaths[i]); + if (message.after != null && Object.hasOwnProperty.call(message, "after")) + $root.google.protobuf.Value.encode(message.after, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PropertyDrift message, length delimited. Does not implicitly {@link google.cloud.config.v1.PropertyDrift.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.IPropertyDrift} message PropertyDrift message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertyDrift.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyDrift.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.PropertyDrift(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + if (!(message.beforeSensitivePaths && message.beforeSensitivePaths.length)) + message.beforeSensitivePaths = []; + message.beforeSensitivePaths.push(reader.string()); + break; + } + case 3: { + message.before = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.afterSensitivePaths && message.afterSensitivePaths.length)) + message.afterSensitivePaths = []; + message.afterSensitivePaths.push(reader.string()); + break; + } + case 5: { + message.after = $root.google.protobuf.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertyDrift message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertyDrift.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertyDrift message. + * @function verify + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertyDrift.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.beforeSensitivePaths != null && message.hasOwnProperty("beforeSensitivePaths")) { + if (!Array.isArray(message.beforeSensitivePaths)) + return "beforeSensitivePaths: array expected"; + for (var i = 0; i < message.beforeSensitivePaths.length; ++i) + if (!$util.isString(message.beforeSensitivePaths[i])) + return "beforeSensitivePaths: string[] expected"; + } + if (message.before != null && message.hasOwnProperty("before")) { + var error = $root.google.protobuf.Value.verify(message.before); + if (error) + return "before." + error; + } + if (message.afterSensitivePaths != null && message.hasOwnProperty("afterSensitivePaths")) { + if (!Array.isArray(message.afterSensitivePaths)) + return "afterSensitivePaths: array expected"; + for (var i = 0; i < message.afterSensitivePaths.length; ++i) + if (!$util.isString(message.afterSensitivePaths[i])) + return "afterSensitivePaths: string[] expected"; + } + if (message.after != null && message.hasOwnProperty("after")) { + var error = $root.google.protobuf.Value.verify(message.after); + if (error) + return "after." + error; + } + return null; + }; + + /** + * Creates a PropertyDrift message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.PropertyDrift} PropertyDrift + */ + PropertyDrift.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.PropertyDrift) + return object; + var message = new $root.google.cloud.config.v1.PropertyDrift(); + if (object.path != null) + message.path = String(object.path); + if (object.beforeSensitivePaths) { + if (!Array.isArray(object.beforeSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyDrift.beforeSensitivePaths: array expected"); + message.beforeSensitivePaths = []; + for (var i = 0; i < object.beforeSensitivePaths.length; ++i) + message.beforeSensitivePaths[i] = String(object.beforeSensitivePaths[i]); + } + if (object.before != null) { + if (typeof object.before !== "object") + throw TypeError(".google.cloud.config.v1.PropertyDrift.before: object expected"); + message.before = $root.google.protobuf.Value.fromObject(object.before); + } + if (object.afterSensitivePaths) { + if (!Array.isArray(object.afterSensitivePaths)) + throw TypeError(".google.cloud.config.v1.PropertyDrift.afterSensitivePaths: array expected"); + message.afterSensitivePaths = []; + for (var i = 0; i < object.afterSensitivePaths.length; ++i) + message.afterSensitivePaths[i] = String(object.afterSensitivePaths[i]); + } + if (object.after != null) { + if (typeof object.after !== "object") + throw TypeError(".google.cloud.config.v1.PropertyDrift.after: object expected"); + message.after = $root.google.protobuf.Value.fromObject(object.after); + } + return message; + }; + + /** + * Creates a plain object from a PropertyDrift message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {google.cloud.config.v1.PropertyDrift} message PropertyDrift + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertyDrift.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.beforeSensitivePaths = []; + object.afterSensitivePaths = []; + } + if (options.defaults) { + object.path = ""; + object.before = null; + object.after = null; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.beforeSensitivePaths && message.beforeSensitivePaths.length) { + object.beforeSensitivePaths = []; + for (var j = 0; j < message.beforeSensitivePaths.length; ++j) + object.beforeSensitivePaths[j] = message.beforeSensitivePaths[j]; + } + if (message.before != null && message.hasOwnProperty("before")) + object.before = $root.google.protobuf.Value.toObject(message.before, options); + if (message.afterSensitivePaths && message.afterSensitivePaths.length) { + object.afterSensitivePaths = []; + for (var j = 0; j < message.afterSensitivePaths.length; ++j) + object.afterSensitivePaths[j] = message.afterSensitivePaths[j]; + } + if (message.after != null && message.hasOwnProperty("after")) + object.after = $root.google.protobuf.Value.toObject(message.after, options); + return object; + }; + + /** + * Converts this PropertyDrift to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.PropertyDrift + * @instance + * @returns {Object.} JSON object + */ + PropertyDrift.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertyDrift + * @function getTypeUrl + * @memberof google.cloud.config.v1.PropertyDrift + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertyDrift.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.PropertyDrift"; + }; + + return PropertyDrift; + })(); + + v1.ListResourceDriftsRequest = (function() { + + /** + * Properties of a ListResourceDriftsRequest. + * @memberof google.cloud.config.v1 + * @interface IListResourceDriftsRequest + * @property {string|null} [parent] ListResourceDriftsRequest parent + * @property {number|null} [pageSize] ListResourceDriftsRequest pageSize + * @property {string|null} [pageToken] ListResourceDriftsRequest pageToken + * @property {string|null} [filter] ListResourceDriftsRequest filter + * @property {string|null} [orderBy] ListResourceDriftsRequest orderBy + */ + + /** + * Constructs a new ListResourceDriftsRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceDriftsRequest. + * @implements IListResourceDriftsRequest + * @constructor + * @param {google.cloud.config.v1.IListResourceDriftsRequest=} [properties] Properties to set + */ + function ListResourceDriftsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceDriftsRequest parent. + * @member {string} parent + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.parent = ""; + + /** + * ListResourceDriftsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.pageSize = 0; + + /** + * ListResourceDriftsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.pageToken = ""; + + /** + * ListResourceDriftsRequest filter. + * @member {string} filter + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.filter = ""; + + /** + * ListResourceDriftsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + */ + ListResourceDriftsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListResourceDriftsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.IListResourceDriftsRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest instance + */ + ListResourceDriftsRequest.create = function create(properties) { + return new ListResourceDriftsRequest(properties); + }; + + /** + * Encodes the specified ListResourceDriftsRequest message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.IListResourceDriftsRequest} message ListResourceDriftsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListResourceDriftsRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.IListResourceDriftsRequest} message ListResourceDriftsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceDriftsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceDriftsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceDriftsRequest message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceDriftsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListResourceDriftsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceDriftsRequest} ListResourceDriftsRequest + */ + ListResourceDriftsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceDriftsRequest) + return object; + var message = new $root.google.cloud.config.v1.ListResourceDriftsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListResourceDriftsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {google.cloud.config.v1.ListResourceDriftsRequest} message ListResourceDriftsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceDriftsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListResourceDriftsRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @instance + * @returns {Object.} JSON object + */ + ListResourceDriftsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceDriftsRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceDriftsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceDriftsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceDriftsRequest"; + }; + + return ListResourceDriftsRequest; + })(); + + v1.ListResourceDriftsResponse = (function() { + + /** + * Properties of a ListResourceDriftsResponse. + * @memberof google.cloud.config.v1 + * @interface IListResourceDriftsResponse + * @property {Array.|null} [resourceDrifts] ListResourceDriftsResponse resourceDrifts + * @property {string|null} [nextPageToken] ListResourceDriftsResponse nextPageToken + * @property {Array.|null} [unreachable] ListResourceDriftsResponse unreachable + */ + + /** + * Constructs a new ListResourceDriftsResponse. + * @memberof google.cloud.config.v1 + * @classdesc Represents a ListResourceDriftsResponse. + * @implements IListResourceDriftsResponse + * @constructor + * @param {google.cloud.config.v1.IListResourceDriftsResponse=} [properties] Properties to set + */ + function ListResourceDriftsResponse(properties) { + this.resourceDrifts = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListResourceDriftsResponse resourceDrifts. + * @member {Array.} resourceDrifts + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + */ + ListResourceDriftsResponse.prototype.resourceDrifts = $util.emptyArray; + + /** + * ListResourceDriftsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + */ + ListResourceDriftsResponse.prototype.nextPageToken = ""; + + /** + * ListResourceDriftsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + */ + ListResourceDriftsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListResourceDriftsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.IListResourceDriftsResponse=} [properties] Properties to set + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse instance + */ + ListResourceDriftsResponse.create = function create(properties) { + return new ListResourceDriftsResponse(properties); + }; + + /** + * Encodes the specified ListResourceDriftsResponse message. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.IListResourceDriftsResponse} message ListResourceDriftsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceDrifts != null && message.resourceDrifts.length) + for (var i = 0; i < message.resourceDrifts.length; ++i) + $root.google.cloud.config.v1.ResourceDrift.encode(message.resourceDrifts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListResourceDriftsResponse message, length delimited. Does not implicitly {@link google.cloud.config.v1.ListResourceDriftsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.IListResourceDriftsResponse} message ListResourceDriftsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListResourceDriftsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.ListResourceDriftsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.resourceDrifts && message.resourceDrifts.length)) + message.resourceDrifts = []; + message.resourceDrifts.push($root.google.cloud.config.v1.ResourceDrift.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListResourceDriftsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListResourceDriftsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListResourceDriftsResponse message. + * @function verify + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListResourceDriftsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceDrifts != null && message.hasOwnProperty("resourceDrifts")) { + if (!Array.isArray(message.resourceDrifts)) + return "resourceDrifts: array expected"; + for (var i = 0; i < message.resourceDrifts.length; ++i) { + var error = $root.google.cloud.config.v1.ResourceDrift.verify(message.resourceDrifts[i]); + if (error) + return "resourceDrifts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListResourceDriftsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.ListResourceDriftsResponse} ListResourceDriftsResponse + */ + ListResourceDriftsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.ListResourceDriftsResponse) + return object; + var message = new $root.google.cloud.config.v1.ListResourceDriftsResponse(); + if (object.resourceDrifts) { + if (!Array.isArray(object.resourceDrifts)) + throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.resourceDrifts: array expected"); + message.resourceDrifts = []; + for (var i = 0; i < object.resourceDrifts.length; ++i) { + if (typeof object.resourceDrifts[i] !== "object") + throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.resourceDrifts: object expected"); + message.resourceDrifts[i] = $root.google.cloud.config.v1.ResourceDrift.fromObject(object.resourceDrifts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.config.v1.ListResourceDriftsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListResourceDriftsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {google.cloud.config.v1.ListResourceDriftsResponse} message ListResourceDriftsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListResourceDriftsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceDrifts = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resourceDrifts && message.resourceDrifts.length) { + object.resourceDrifts = []; + for (var j = 0; j < message.resourceDrifts.length; ++j) + object.resourceDrifts[j] = $root.google.cloud.config.v1.ResourceDrift.toObject(message.resourceDrifts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListResourceDriftsResponse to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @instance + * @returns {Object.} JSON object + */ + ListResourceDriftsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListResourceDriftsResponse + * @function getTypeUrl + * @memberof google.cloud.config.v1.ListResourceDriftsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListResourceDriftsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.ListResourceDriftsResponse"; + }; + + return ListResourceDriftsResponse; + })(); + + v1.GetResourceDriftRequest = (function() { + + /** + * Properties of a GetResourceDriftRequest. + * @memberof google.cloud.config.v1 + * @interface IGetResourceDriftRequest + * @property {string|null} [name] GetResourceDriftRequest name + */ + + /** + * Constructs a new GetResourceDriftRequest. + * @memberof google.cloud.config.v1 + * @classdesc Represents a GetResourceDriftRequest. + * @implements IGetResourceDriftRequest + * @constructor + * @param {google.cloud.config.v1.IGetResourceDriftRequest=} [properties] Properties to set + */ + function GetResourceDriftRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetResourceDriftRequest name. + * @member {string} name + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @instance + */ + GetResourceDriftRequest.prototype.name = ""; + + /** + * Creates a new GetResourceDriftRequest instance using the specified properties. + * @function create + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.IGetResourceDriftRequest=} [properties] Properties to set + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest instance + */ + GetResourceDriftRequest.create = function create(properties) { + return new GetResourceDriftRequest(properties); + }; + + /** + * Encodes the specified GetResourceDriftRequest message. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.IGetResourceDriftRequest} message GetResourceDriftRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceDriftRequest.encode = function encode(message, writer) { + 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 GetResourceDriftRequest message, length delimited. Does not implicitly {@link google.cloud.config.v1.GetResourceDriftRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.IGetResourceDriftRequest} message GetResourceDriftRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetResourceDriftRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceDriftRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.config.v1.GetResourceDriftRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetResourceDriftRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetResourceDriftRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetResourceDriftRequest message. + * @function verify + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetResourceDriftRequest.verify = function verify(message) { + if (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 GetResourceDriftRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.config.v1.GetResourceDriftRequest} GetResourceDriftRequest + */ + GetResourceDriftRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.config.v1.GetResourceDriftRequest) + return object; + var message = new $root.google.cloud.config.v1.GetResourceDriftRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetResourceDriftRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {google.cloud.config.v1.GetResourceDriftRequest} message GetResourceDriftRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetResourceDriftRequest.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 GetResourceDriftRequest to JSON. + * @function toJSON + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @instance + * @returns {Object.} JSON object + */ + GetResourceDriftRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetResourceDriftRequest + * @function getTypeUrl + * @memberof google.cloud.config.v1.GetResourceDriftRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetResourceDriftRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.config.v1.GetResourceDriftRequest"; + }; + + return GetResourceDriftRequest; + })(); + + return v1; + })(); + + return config; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { /** * Properties of a HttpRule. @@ -17346,6 +20980,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -17380,6 +21015,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -17412,6 +21055,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -17463,6 +21108,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17514,6 +21163,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -17556,6 +21210,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -17574,8 +21233,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -17583,6 +21244,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -19405,6 +23068,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -19430,6 +23094,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -19456,6 +23128,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -19496,6 +23170,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19536,6 +23214,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -19556,6 +23239,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -19572,10 +23260,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -19605,6 +23297,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -20481,6 +24425,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -20492,6 +24437,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -20506,6 +24452,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -20532,6 +24486,9 @@ 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(); return writer; }; @@ -20562,7 +24519,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -20572,6 +24529,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -20612,6 +24592,14 @@ 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"; + } return null; }; @@ -20632,6 +24620,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -20648,10 +24643,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -21290,6 +25293,251 @@ return values; })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + /** * LaunchStage enum. * @name google.api.LaunchStage @@ -21351,6 +25599,7 @@ * @memberof google.api * @interface IFieldInfo * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + * @property {Array.|null} [referencedTypes] FieldInfo referencedTypes */ /** @@ -21362,6 +25611,7 @@ * @param {google.api.IFieldInfo=} [properties] Properties to set */ function FieldInfo(properties) { + this.referencedTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21376,6 +25626,14 @@ */ FieldInfo.prototype.format = 0; + /** + * FieldInfo referencedTypes. + * @member {Array.} referencedTypes + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.referencedTypes = $util.emptyArray; + /** * Creates a new FieldInfo instance using the specified properties. * @function create @@ -21402,6 +25660,9 @@ writer = $Writer.create(); if (message.format != null && Object.hasOwnProperty.call(message, "format")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.referencedTypes != null && message.referencedTypes.length) + for (var i = 0; i < message.referencedTypes.length; ++i) + $root.google.api.TypeReference.encode(message.referencedTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -21442,6 +25703,12 @@ message.format = reader.int32(); break; } + case 2: { + if (!(message.referencedTypes && message.referencedTypes.length)) + message.referencedTypes = []; + message.referencedTypes.push($root.google.api.TypeReference.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -21488,6 +25755,15 @@ case 4: break; } + if (message.referencedTypes != null && message.hasOwnProperty("referencedTypes")) { + if (!Array.isArray(message.referencedTypes)) + return "referencedTypes: array expected"; + for (var i = 0; i < message.referencedTypes.length; ++i) { + var error = $root.google.api.TypeReference.verify(message.referencedTypes[i]); + if (error) + return "referencedTypes." + error; + } + } return null; }; @@ -21531,6 +25807,16 @@ message.format = 4; break; } + if (object.referencedTypes) { + if (!Array.isArray(object.referencedTypes)) + throw TypeError(".google.api.FieldInfo.referencedTypes: array expected"); + message.referencedTypes = []; + for (var i = 0; i < object.referencedTypes.length; ++i) { + if (typeof object.referencedTypes[i] !== "object") + throw TypeError(".google.api.FieldInfo.referencedTypes: object expected"); + message.referencedTypes[i] = $root.google.api.TypeReference.fromObject(object.referencedTypes[i]); + } + } return message; }; @@ -21547,10 +25833,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.referencedTypes = []; if (options.defaults) object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; if (message.format != null && message.hasOwnProperty("format")) object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + if (message.referencedTypes && message.referencedTypes.length) { + object.referencedTypes = []; + for (var j = 0; j < message.referencedTypes.length; ++j) + object.referencedTypes[j] = $root.google.api.TypeReference.toObject(message.referencedTypes[j], options); + } return object; }; @@ -21603,6 +25896,211 @@ return FieldInfo; })(); + api.TypeReference = (function() { + + /** + * Properties of a TypeReference. + * @memberof google.api + * @interface ITypeReference + * @property {string|null} [typeName] TypeReference typeName + */ + + /** + * Constructs a new TypeReference. + * @memberof google.api + * @classdesc Represents a TypeReference. + * @implements ITypeReference + * @constructor + * @param {google.api.ITypeReference=} [properties] Properties to set + */ + function TypeReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TypeReference typeName. + * @member {string} typeName + * @memberof google.api.TypeReference + * @instance + */ + TypeReference.prototype.typeName = ""; + + /** + * Creates a new TypeReference instance using the specified properties. + * @function create + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference=} [properties] Properties to set + * @returns {google.api.TypeReference} TypeReference instance + */ + TypeReference.create = function create(properties) { + return new TypeReference(properties); + }; + + /** + * Encodes the specified TypeReference message. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @function encode + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference} message TypeReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.typeName); + return writer; + }; + + /** + * Encodes the specified TypeReference message, length delimited. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference} message TypeReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypeReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.TypeReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.TypeReference} TypeReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.TypeReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.typeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypeReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.TypeReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.TypeReference} TypeReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypeReference message. + * @function verify + * @memberof google.api.TypeReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TypeReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + return null; + }; + + /** + * Creates a TypeReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.TypeReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.TypeReference} TypeReference + */ + TypeReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.TypeReference) + return object; + var message = new $root.google.api.TypeReference(); + if (object.typeName != null) + message.typeName = String(object.typeName); + return message; + }; + + /** + * Creates a plain object from a TypeReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.TypeReference + * @static + * @param {google.api.TypeReference} message TypeReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TypeReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.typeName = ""; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + return object; + }; + + /** + * Converts this TypeReference to JSON. + * @function toJSON + * @memberof google.api.TypeReference + * @instance + * @returns {Object.} JSON object + */ + TypeReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TypeReference + * @function getTypeUrl + * @memberof google.api.TypeReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TypeReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.TypeReference"; + }; + + return TypeReference; + })(); + api.ResourceDescriptor = (function() { /** @@ -22534,6 +27032,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -22548,6 +27047,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -22572,6 +27072,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -22594,6 +27095,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -22644,6 +27146,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -22765,6 +27275,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -22837,6 +27350,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -22939,6 +27458,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -22993,6 +27519,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -23045,6 +27572,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -23108,6 +27642,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -23173,6 +27711,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -23229,6 +27768,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -23277,6 +27821,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -23382,6 +27927,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -23434,6 +27987,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -23526,6 +28081,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -23639,6 +28198,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -23738,6 +28306,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -23767,6 +28355,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -23812,6 +28401,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -25856,6 +30447,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -25916,6 +30508,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -25953,6 +30553,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -26015,6 +30617,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -26083,6 +30689,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -26132,6 +30747,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -26156,6 +30791,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -26176,6 +30812,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -28494,6 +33132,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo @@ -28615,6 +33254,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -28697,6 +33344,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -28800,6 +33449,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -28939,6 +33592,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -29132,6 +33790,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -29234,6 +33897,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; object[".google.api.fieldInfo"] = null; } @@ -29267,6 +33931,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -29342,71 +34008,371 @@ 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; - })(); + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + 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_LEGACY": + case 900: + message.edition = 900; + 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"; + }; - /** - * 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; + return EditionDefault; })(); - FieldOptions.EditionDefault = (function() { + FieldOptions.FeatureSupport = (function() { /** - * Properties of an EditionDefault. + * Properties of a FeatureSupport. * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved */ /** - * Constructs a new EditionDefault. + * Constructs a new FeatureSupport. * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set */ - function EditionDefault(properties) { + function FeatureSupport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29414,91 +34380,119 @@ } /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance */ - EditionDefault.prototype.edition = 0; + FeatureSupport.prototype.editionIntroduced = 0; /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance */ - EditionDefault.prototype.value = ""; + FeatureSupport.prototype.editionDeprecated = 0; /** - * Creates a new EditionDefault instance using the specified properties. + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); }; /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encode = function encode(message, writer) { + FeatureSupport.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); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); return writer; }; /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EditionDefault message from the specified reader or buffer. + * Decodes a FeatureSupport message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @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 + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EditionDefault.decode = function decode(reader, length, error) { + FeatureSupport.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); + case 1: { + message.editionIntroduced = reader.int32(); break; } case 2: { - message.value = reader.string(); + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); break; } default: @@ -29510,37 +34504,77 @@ }; /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport * @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) { + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EditionDefault message. + * Verifies a FeatureSupport message. * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @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) { + FeatureSupport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { default: - return "edition: enum value expected"; + return "editionIntroduced: enum value expected"; case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: case 998: case 999: case 1000: @@ -29553,132 +34587,251 @@ 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. + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { default: - if (typeof object.edition === "number") { - message.edition = object.edition; + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; break; } break; case "EDITION_UNKNOWN": case 0: - message.edition = 0; + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; break; case "EDITION_PROTO2": case 998: - message.edition = 998; + message.editionIntroduced = 998; break; case "EDITION_PROTO3": case 999: - message.edition = 999; + message.editionIntroduced = 999; break; case "EDITION_2023": case 1000: - message.edition = 1000; + message.editionIntroduced = 1000; break; case "EDITION_2024": case 1001: - message.edition = 1001; + message.editionIntroduced = 1001; break; case "EDITION_1_TEST_ONLY": case 1: - message.edition = 1; + message.editionIntroduced = 1; break; case "EDITION_2_TEST_ONLY": case 2: - message.edition = 2; + message.editionIntroduced = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: - message.edition = 99997; + message.editionIntroduced = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: - message.edition = 99998; + message.editionIntroduced = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: - message.edition = 99999; + message.editionIntroduced = 99999; break; case "EDITION_MAX": case 2147483647: - message.edition = 2147483647; + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 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. + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + FeatureSupport.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; + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; /** - * Converts this EditionDefault to JSON. + * Converts this FeatureSupport to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance * @returns {Object.} JSON object */ - EditionDefault.prototype.toJSON = function toJSON() { + FeatureSupport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EditionDefault + * Gets the default type url for FeatureSupport * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; }; - return EditionDefault; + return FeatureSupport; })(); return FieldOptions; @@ -30273,6 +35426,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -30316,6 +35470,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -30354,6 +35516,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -30405,6 +35569,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -30457,6 +35625,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -30490,6 +35663,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -30522,6 +35700,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -30529,6 +35708,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -31996,6 +37177,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -32061,6 +37244,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -32097,6 +37296,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -32157,6 +37360,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -32247,6 +37458,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -32386,6 +37617,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -32409,6 +37688,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -32422,6 +37703,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -32549,6 +37834,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -32733,6 +38231,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -32750,6 +38249,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -32798,6 +38298,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -32850,6 +38354,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -32958,7 +38466,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -32985,12 +38494,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -33016,10 +38533,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -33060,8 +38579,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -33104,6 +38627,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -33116,10 +38640,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -33147,6 +38676,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -33188,10 +38721,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -33210,13 +38748,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -34431,6 +39972,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Duration = (function() { /** diff --git a/packages/google-cloud-config/protos/protos.json b/packages/google-cloud-config/protos/protos.json index e46c34dedad0..fe2e99ddce29 100644 --- a/packages/google-cloud-config/protos/protos.json +++ b/packages/google-cloud-config/protos/protos.json @@ -502,6 +502,78 @@ "(google.api.method_signature)": "name" } ] + }, + "ListResourceChanges": { + "requestType": "ListResourceChangesRequest", + "responseType": "ListResourceChangesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceChanges" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetResourceChange": { + "requestType": "GetResourceChangeRequest", + "responseType": "ResourceChange", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/previews/*/resourceChanges/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListResourceDrifts": { + "requestType": "ListResourceDriftsRequest", + "responseType": "ListResourceDriftsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/previews/*}/resourceDrifts" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetResourceDrift": { + "requestType": "GetResourceDriftRequest", + "responseType": "ResourceDrift", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/previews/*/resourceDrifts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] } } }, @@ -556,7 +628,10 @@ }, "name": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } }, "createTime": { "type": "google.protobuf.Timestamp", @@ -575,7 +650,10 @@ "labels": { "keyType": "string", "type": "string", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "state": { "type": "State", @@ -770,7 +848,10 @@ "inputValues": { "keyType": "string", "type": "TerraformVariable", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -778,7 +859,10 @@ "fields": { "inputValue": { "type": "google.protobuf.Value", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -1300,7 +1384,10 @@ }, "error": { "type": "google.rpc.Status", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2084,77 +2171,511 @@ "(google.api.resource_reference).type": "config.googleapis.com/Preview" } }, - "requestId": { + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ExportPreviewResultRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Preview" + } + } + } + }, + "ExportPreviewResultResponse": { + "fields": { + "result": { + "type": "PreviewResult", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "PreviewResult": { + "fields": { + "binarySignedUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "jsonSignedUri": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetTerraformVersionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/TerraformVersion" + } + } + } + }, + "ListTerraformVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListTerraformVersionsResponse": { + "fields": { + "terraformVersions": { + "rule": "repeated", + "type": "TerraformVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "TerraformVersion": { + "options": { + "(google.api.resource).type": "config.googleapis.com/TerraformVersion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/terraformVersions/{terraform_version}", + "(google.api.resource).plural": "terraformVersions", + "(google.api.resource).singular": "terraformVersion" + }, + "oneofs": { + "_deprecateTime": { + "oneof": [ + "deprecateTime" + ] + }, + "_obsoleteTime": { + "oneof": [ + "obsoleteTime" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "state": { + "type": "State", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "supportTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deprecateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + }, + "obsoleteTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "proto3_optional": true + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "DEPRECATED": 2, + "OBSOLETE": 3 + } + } + } + }, + "ResourceChangeTerraformInfo": { + "fields": { + "address": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "provider": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "actions": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ResourceChange": { + "options": { + "(google.api.resource).type": "config.googleapis.com/ResourceChange", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}", + "(google.api.resource).plural": "resourceChanges", + "(google.api.resource).singular": "resourceChange" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "terraformInfo": { + "type": "ResourceChangeTerraformInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "intent": { + "type": "Intent", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "propertyChanges": { + "rule": "repeated", + "type": "PropertyChange", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Intent": { + "values": { + "INTENT_UNSPECIFIED": 0, + "CREATE": 1, + "UPDATE": 2, + "DELETE": 3, + "RECREATE": 4, + "UNCHANGED": 5 + } + } + } + }, + "PropertyChange": { + "fields": { + "path": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "beforeSensitivePaths": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "before": { + "type": "google.protobuf.Value", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "afterSensitivePaths": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "after": { + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ListResourceChangesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/Preview" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListResourceChangesResponse": { + "fields": { + "resourceChanges": { + "rule": "repeated", + "type": "ResourceChange", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetResourceChangeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/ResourceChange" + } + } + } + }, + "ResourceDriftTerraformInfo": { + "fields": { + "address": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "provider": { "type": "string", - "id": 2, + "id": 4, "options": { - "(google.api.field_info).format": "UUID4", - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "ExportPreviewResultRequest": { + "ResourceDrift": { + "options": { + "(google.api.resource).type": "config.googleapis.com/ResourceDrift", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}", + "(google.api.resource).plural": "resourceDrifts", + "(google.api.resource).singular": "resourceDrift" + }, "fields": { - "parent": { + "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/Preview" + "(google.api.field_behavior)": "IDENTIFIER" } - } - } - }, - "ExportPreviewResultResponse": { - "fields": { - "result": { - "type": "PreviewResult", - "id": 1, + }, + "terraformInfo": { + "type": "ResourceDriftTerraformInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "propertyDrifts": { + "rule": "repeated", + "type": "PropertyDrift", + "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "PreviewResult": { + "PropertyDrift": { "fields": { - "binarySignedUri": { + "path": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "jsonSignedUri": { + "beforeSensitivePaths": { + "rule": "repeated", "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "GetTerraformVersionRequest": { - "fields": { - "name": { + }, + "before": { + "type": "google.protobuf.Value", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "afterSensitivePaths": { + "rule": "repeated", "type": "string", - "id": 1, + "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "config.googleapis.com/TerraformVersion" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "after": { + "type": "google.protobuf.Value", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" } } } }, - "ListTerraformVersionsRequest": { + "ListResourceDriftsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" + "(google.api.resource_reference).type": "config.googleapis.com/Preview" } }, "pageSize": { @@ -2187,11 +2708,11 @@ } } }, - "ListTerraformVersionsResponse": { + "ListResourceDriftsResponse": { "fields": { - "terraformVersions": { + "resourceDrifts": { "rule": "repeated", - "type": "TerraformVersion", + "type": "ResourceDrift", "id": 1 }, "nextPageToken": { @@ -2205,71 +2726,14 @@ } } }, - "TerraformVersion": { - "options": { - "(google.api.resource).type": "config.googleapis.com/TerraformVersion", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/terraformVersions/{terraform_version}", - "(google.api.resource).plural": "terraformVersions", - "(google.api.resource).singular": "terraformVersion" - }, - "oneofs": { - "_deprecateTime": { - "oneof": [ - "deprecateTime" - ] - }, - "_obsoleteTime": { - "oneof": [ - "obsoleteTime" - ] - } - }, + "GetResourceDriftRequest": { "fields": { "name": { "type": "string", "id": 1, "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "state": { - "type": "State", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "supportTime": { - "type": "google.protobuf.Timestamp", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "deprecateTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - }, - "obsoleteTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY", - "proto3_optional": true - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "DEPRECATED": 2, - "OBSOLETE": 3 + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "config.googleapis.com/ResourceDrift" } } } @@ -2286,8 +2750,7 @@ "java_multiple_files": true, "java_outer_classname": "ResourceProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "http": { @@ -2411,6 +2874,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -2551,6 +3018,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -2608,6 +3097,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -2669,6 +3163,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -2713,6 +3220,11 @@ "format": { "type": "Format", "id": 1 + }, + "referencedTypes": { + "rule": "repeated", + "type": "TypeReference", + "id": 2 } }, "nested": { @@ -2727,6 +3239,14 @@ } } }, + "TypeReference": { + "fields": { + "typeName": { + "type": "string", + "id": 1 + } + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -2825,12 +3345,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -2869,6 +3396,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -2957,6 +3489,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -3182,6 +3718,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -3396,6 +3936,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -3531,7 +4072,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -3559,6 +4101,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3628,6 +4174,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -3716,6 +4282,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3858,6 +4428,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -3868,6 +4439,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -3878,6 +4450,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -3888,6 +4461,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -3898,7 +4472,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -3908,27 +4483,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -3973,7 +4559,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -3988,6 +4580,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -4015,11 +4634,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -4032,6 +4666,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -4117,6 +4757,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Duration": { "fields": { "seconds": { @@ -4238,6 +4886,7 @@ "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", "php_namespace": "Google\\LongRunning" }, "nested": { diff --git a/packages/google-cloud-config/samples/README.md b/packages/google-cloud-config/samples/README.md index 33f8fce0726d..452765998b02 100644 --- a/packages/google-cloud-config/samples/README.md +++ b/packages/google-cloud-config/samples/README.md @@ -24,11 +24,15 @@ * [Config.get_deployment](#config.get_deployment) * [Config.get_preview](#config.get_preview) * [Config.get_resource](#config.get_resource) + * [Config.get_resource_change](#config.get_resource_change) + * [Config.get_resource_drift](#config.get_resource_drift) * [Config.get_revision](#config.get_revision) * [Config.get_terraform_version](#config.get_terraform_version) * [Config.import_statefile](#config.import_statefile) * [Config.list_deployments](#config.list_deployments) * [Config.list_previews](#config.list_previews) + * [Config.list_resource_changes](#config.list_resource_changes) + * [Config.list_resource_drifts](#config.list_resource_drifts) * [Config.list_resources](#config.list_resources) * [Config.list_revisions](#config.list_revisions) * [Config.list_terraform_versions](#config.list_terraform_versions) @@ -256,6 +260,40 @@ __Usage:__ +### Config.get_resource_change + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js` + + +----- + + + + +### Config.get_resource_drift + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js` + + +----- + + + + ### Config.get_revision View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.get_revision.js). @@ -341,6 +379,40 @@ __Usage:__ +### Config.list_resource_changes + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js` + + +----- + + + + +### Config.list_resource_drifts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js` + + +----- + + + + ### Config.list_resources View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-config/samples/generated/v1/config.list_resources.js). diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js b/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js new file mode 100644 index 000000000000..987dd8ff8c87 --- /dev/null +++ b/packages/google-cloud-config/samples/generated/v1/config.get_resource_change.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetResourceChange_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource change to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetResourceChange() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getResourceChange(request); + console.log(response); + } + + callGetResourceChange(); + // [END config_v1_generated_Config_GetResourceChange_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js b/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js new file mode 100644 index 000000000000..882c274c894d --- /dev/null +++ b/packages/google-cloud-config/samples/generated/v1/config.get_resource_drift.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START config_v1_generated_Config_GetResourceDrift_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource drift to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + */ + // const name = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callGetResourceDrift() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await configClient.getResourceDrift(request); + console.log(response); + } + + callGetResourceDrift(); + // [END config_v1_generated_Config_GetResourceDrift_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js b/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js new file mode 100644 index 000000000000..d21ea45a19cd --- /dev/null +++ b/packages/google-cloud-config/samples/generated/v1/config.list_resource_changes.js @@ -0,0 +1,97 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 config_v1_generated_Config_ListResourceChanges_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListResourceChanges() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listResourceChangesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListResourceChanges(); + // [END config_v1_generated_Config_ListResourceChanges_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js b/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js new file mode 100644 index 000000000000..81ed178228d6 --- /dev/null +++ b/packages/google-cloud-config/samples/generated/v1/config.list_resource_drifts.js @@ -0,0 +1,97 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 config_v1_generated_Config_ListResourceDrifts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + */ + // const filter = 'abc123' + /** + * Optional. Field to use to sort the list. + */ + // const orderBy = 'abc123' + + // Imports the Config library + const {ConfigClient} = require('@google-cloud/config').v1; + + // Instantiates a client + const configClient = new ConfigClient(); + + async function callListResourceDrifts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = configClient.listResourceDriftsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListResourceDrifts(); + // [END config_v1_generated_Config_ListResourceDrifts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js b/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js index ed72847f90e6..837f1f9f5884 100644 --- a/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js +++ b/packages/google-cloud-config/samples/generated/v1/config.list_terraform_versions.js @@ -35,15 +35,15 @@ function main(parent) { */ // const parent = 'abc123' /** - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. */ // const pageSize = 1234 /** * Optional. Token returned by previous call to 'ListTerraformVersions' which * specifies the position in the list from where to continue listing the - * resources. + * terraform versions. */ // const pageToken = 'abc123' /** diff --git a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json index f3bdddd407a7..da65ecbf0647 100644 --- a/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json +++ b/packages/google-cloud-config/samples/generated/v1/snippet_metadata_google.cloud.config.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-config", - "version": "0.9.0", + "version": "0.10.0", "language": "TYPESCRIPT", "apis": [ { @@ -1078,6 +1078,198 @@ } } } + }, + { + "regionTag": "config_v1_generated_Config_ListResourceChanges_async", + "title": "Config listResourceChanges Sample", + "origin": "API_DEFINITION", + "description": " Lists ResourceChanges for a given preview.", + "canonical": true, + "file": "config.list_resource_changes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListResourceChanges", + "fullName": "google.cloud.config.v1.Config.ListResourceChanges", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListResourceChangesResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListResourceChanges", + "fullName": "google.cloud.config.v1.Config.ListResourceChanges", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetResourceChange_async", + "title": "Config getResourceChange Sample", + "origin": "API_DEFINITION", + "description": " Get a ResourceChange for a given preview.", + "canonical": true, + "file": "config.get_resource_change.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResourceChange", + "fullName": "google.cloud.config.v1.Config.GetResourceChange", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ResourceChange", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetResourceChange", + "fullName": "google.cloud.config.v1.Config.GetResourceChange", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_ListResourceDrifts_async", + "title": "Config listResourceDrifts Sample", + "origin": "API_DEFINITION", + "description": " List ResourceDrifts for a given preview.", + "canonical": true, + "file": "config.list_resource_drifts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListResourceDrifts", + "fullName": "google.cloud.config.v1.Config.ListResourceDrifts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ListResourceDriftsResponse", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "ListResourceDrifts", + "fullName": "google.cloud.config.v1.Config.ListResourceDrifts", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } + }, + { + "regionTag": "config_v1_generated_Config_GetResourceDrift_async", + "title": "Config getResourceDrift Sample", + "origin": "API_DEFINITION", + "description": " Get a ResourceDrift for a given preview.", + "canonical": true, + "file": "config.get_resource_drift.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetResourceDrift", + "fullName": "google.cloud.config.v1.Config.GetResourceDrift", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.config.v1.ResourceDrift", + "client": { + "shortName": "ConfigClient", + "fullName": "google.cloud.config.v1.ConfigClient" + }, + "method": { + "shortName": "GetResourceDrift", + "fullName": "google.cloud.config.v1.Config.GetResourceDrift", + "service": { + "shortName": "Config", + "fullName": "google.cloud.config.v1.Config" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-config/samples/package.json b/packages/google-cloud-config/samples/package.json index 7db149d28a90..7940914d5a2c 100644 --- a/packages/google-cloud-config/samples/package.json +++ b/packages/google-cloud-config/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/config": "^0.9.0" + "@google-cloud/config": "^0.10.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-config/src/v1/config_client.ts b/packages/google-cloud-config/src/v1/config_client.ts index e4cc0f4d76ac..e80841b7188f 100644 --- a/packages/google-cloud-config/src/v1/config_client.ts +++ b/packages/google-cloud-config/src/v1/config_client.ts @@ -200,6 +200,12 @@ export class ConfigClient { resourcePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}' ), + resourceChangePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}' + ), + resourceDriftPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}' + ), revisionPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}' ), @@ -227,7 +233,11 @@ export class ConfigClient { listPreviews: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'previews'), listTerraformVersions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'terraformVersions') + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'terraformVersions'), + listResourceChanges: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resourceChanges'), + listResourceDrifts: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resourceDrifts') }; const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); @@ -346,7 +356,7 @@ export class ConfigClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const configStubMethods = - ['listDeployments', 'getDeployment', 'createDeployment', 'updateDeployment', 'deleteDeployment', 'listRevisions', 'getRevision', 'getResource', 'listResources', 'exportDeploymentStatefile', 'exportRevisionStatefile', 'importStatefile', 'deleteStatefile', 'lockDeployment', 'unlockDeployment', 'exportLockInfo', 'createPreview', 'getPreview', 'listPreviews', 'deletePreview', 'exportPreviewResult', 'listTerraformVersions', 'getTerraformVersion']; + ['listDeployments', 'getDeployment', 'createDeployment', 'updateDeployment', 'deleteDeployment', 'listRevisions', 'getRevision', 'getResource', 'listResources', 'exportDeploymentStatefile', 'exportRevisionStatefile', 'importStatefile', 'deleteStatefile', 'lockDeployment', 'unlockDeployment', 'exportLockInfo', 'createPreview', 'getPreview', 'listPreviews', 'deletePreview', 'exportPreviewResult', 'listTerraformVersions', 'getTerraformVersion', 'listResourceChanges', 'getResourceChange', 'listResourceDrifts', 'getResourceDrift']; for (const methodName of configStubMethods) { const callPromise = this.configStub.then( stub => (...args: Array<{}>) => { @@ -1514,6 +1524,198 @@ export class ConfigClient { throw error; }); } +/** + * Get a ResourceChange for a given preview. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the resource change to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceChanges/{resource_change}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.config.v1.ResourceChange|ResourceChange}. + * 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/config.get_resource_change.js + * region_tag:config_v1_generated_Config_GetResourceChange_async + */ + getResourceChange( + request?: protos.google.cloud.config.v1.IGetResourceChangeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, {}|undefined + ]>; + getResourceChange( + request: protos.google.cloud.config.v1.IGetResourceChangeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>): void; + getResourceChange( + request: protos.google.cloud.config.v1.IGetResourceChangeRequest, + callback: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>): void; + getResourceChange( + request?: protos.google.cloud.config.v1.IGetResourceChangeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getResourceChange request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getResourceChange response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getResourceChange(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IResourceChange, + protos.google.cloud.config.v1.IGetResourceChangeRequest|undefined, + {}|undefined + ]) => { + this._log.info('getResourceChange response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get a ResourceDrift for a given preview. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the resource drift to retrieve. + * Format: + * 'projects/{project_id}/locations/{location}/previews/{preview}/resourceDrifts/{resource_drift}'. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.config.v1.ResourceDrift|ResourceDrift}. + * 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/config.get_resource_drift.js + * region_tag:config_v1_generated_Config_GetResourceDrift_async + */ + getResourceDrift( + request?: protos.google.cloud.config.v1.IGetResourceDriftRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, {}|undefined + ]>; + getResourceDrift( + request: protos.google.cloud.config.v1.IGetResourceDriftRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>): void; + getResourceDrift( + request: protos.google.cloud.config.v1.IGetResourceDriftRequest, + callback: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>): void; + getResourceDrift( + request?: protos.google.cloud.config.v1.IGetResourceDriftRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getResourceDrift request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getResourceDrift response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getResourceDrift(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.config.v1.IResourceDrift, + protos.google.cloud.config.v1.IGetResourceDriftRequest|undefined, + {}|undefined + ]) => { + this._log.info('getResourceDrift response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } /** * Creates a {@link protos.google.cloud.config.v1.Deployment|Deployment}. @@ -3471,13 +3673,13 @@ export class ConfigClient { * parent value is in the format: * 'projects/{project_id}/locations/{location}'. * @param {number} [request.pageSize] - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. * @param {string} [request.pageToken] * Optional. Token returned by previous call to 'ListTerraformVersions' which * specifies the position in the list from where to continue listing the - * resources. + * terraform versions. * @param {string} [request.filter] * Optional. Lists the TerraformVersions that match the filter expression. A * filter expression filters the resources listed in the response. The @@ -3586,13 +3788,13 @@ export class ConfigClient { * parent value is in the format: * 'projects/{project_id}/locations/{location}'. * @param {number} [request.pageSize] - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. * @param {string} [request.pageToken] * Optional. Token returned by previous call to 'ListTerraformVersions' which * specifies the position in the list from where to continue listing the - * resources. + * terraform versions. * @param {string} [request.filter] * Optional. Lists the TerraformVersions that match the filter expression. A * filter expression filters the resources listed in the response. The @@ -3650,13 +3852,13 @@ export class ConfigClient { * parent value is in the format: * 'projects/{project_id}/locations/{location}'. * @param {number} [request.pageSize] - * Optional. When requesting a page of resources, 'page_size' specifies number - * of resources to return. If unspecified, at most 500 will be returned. The - * maximum value is 1000. + * Optional. When requesting a page of terraform versions, 'page_size' + * specifies number of terraform versions to return. If unspecified, at most + * 500 will be returned. The maximum value is 1000. * @param {string} [request.pageToken] * Optional. Token returned by previous call to 'ListTerraformVersions' which * specifies the position in the list from where to continue listing the - * resources. + * terraform versions. * @param {string} [request.filter] * Optional. Lists the TerraformVersions that match the filter expression. A * filter expression filters the resources listed in the response. The @@ -3703,71 +3905,591 @@ export class ConfigClient { callSettings ) as AsyncIterable; } -/** - * Gets the access control policy for a resource. Returns an empty policy - * if the resource exists and does not have a policy set. + /** + * Lists ResourceChanges for a given preview. * * @param {Object} request * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {Object} [request.options] - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. This field is only used by Cloud IAM. - * - * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] - * The function which will be called with the result of the API call. + * @param {string} request.parent + * Required. The parent in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + * @param {string} [request.filter] + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. * - * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.ResourceChange|ResourceChange}. + * 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 `listResourceChangesAsync()` + * 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. */ - getIamPolicy( - request: IamProtos.google.iam.v1.GetIamPolicyRequest, - options?: - | gax.CallOptions - | Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - IamProtos.google.iam.v1.Policy, - IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, - {} | null | undefined - > - ):Promise<[IamProtos.google.iam.v1.Policy]> { - return this.iamClient.getIamPolicy(request, options, callback); + listResourceChanges( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceChange[], + protos.google.cloud.config.v1.IListResourceChangesRequest|null, + protos.google.cloud.config.v1.IListResourceChangesResponse + ]>; + listResourceChanges( + request: protos.google.cloud.config.v1.IListResourceChangesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>): void; + listResourceChanges( + request: protos.google.cloud.config.v1.IListResourceChangesRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>): void; + listResourceChanges( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>): + Promise<[ + protos.google.cloud.config.v1.IResourceChange[], + protos.google.cloud.config.v1.IListResourceChangesRequest|null, + protos.google.cloud.config.v1.IListResourceChangesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceChangesRequest, + protos.google.cloud.config.v1.IListResourceChangesResponse|null|undefined, + protos.google.cloud.config.v1.IResourceChange>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listResourceChanges values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listResourceChanges request %j', request); + return this.innerApiCalls + .listResourceChanges(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IResourceChange[], + protos.google.cloud.config.v1.IListResourceChangesRequest|null, + protos.google.cloud.config.v1.IListResourceChangesResponse + ]) => { + this._log.info('listResourceChanges values %j', response); + return [response, input, output]; + }); } /** - * Returns permissions that a caller has on the specified resource. If the - * resource does not exist, this will return an empty set of - * permissions, not a NOT_FOUND error. - * - * Note: This operation is designed to be used for building - * permission-aware UIs and command-line tools, not for authorization - * checking. This operation may "fail open" without warning. - * + * Equivalent to `listResourceChanges`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. - * @param {string} request.resource - * REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param {string[]} request.permissions - * The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. - * @param {Object} [options] - * Optional parameters. You can override the default settings for this call, e.g, timeout, - * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. - * @param {function(?Error, ?Object)} [callback] + * @param {string} request.parent + * Required. The parent in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + * @param {string} [request.filter] + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.config.v1.ResourceChange|ResourceChange} 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 `listResourceChangesAsync()` + * 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. + */ + listResourceChangesStream( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + 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['listResourceChanges']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceChanges stream %j', request); + return this.descriptors.page.listResourceChanges.createStream( + this.innerApiCalls.listResourceChanges as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listResourceChanges`, 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 in whose context the ResourceChanges are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource changes, 'page_size' specifies + * number of resource changes to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceChanges' which + * specifies the position in the list from where to continue listing the + * resource changes. + * @param {string} [request.filter] + * Optional. Lists the resource changes that match the filter expression. A + * filter expression filters the resource changes listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceChanges/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.config.v1.ResourceChange|ResourceChange}. 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/config.list_resource_changes.js + * region_tag:config_v1_generated_Config_ListResourceChanges_async + */ + listResourceChangesAsync( + request?: protos.google.cloud.config.v1.IListResourceChangesRequest, + 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['listResourceChanges']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceChanges iterate %j', request); + return this.descriptors.page.listResourceChanges.asyncIterate( + this.innerApiCalls['listResourceChanges'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * List ResourceDrifts for a given preview. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + * @param {string} [request.filter] + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.config.v1.ResourceDrift|ResourceDrift}. + * 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 `listResourceDriftsAsync()` + * 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. + */ + listResourceDrifts( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift[], + protos.google.cloud.config.v1.IListResourceDriftsRequest|null, + protos.google.cloud.config.v1.IListResourceDriftsResponse + ]>; + listResourceDrifts( + request: protos.google.cloud.config.v1.IListResourceDriftsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>): void; + listResourceDrifts( + request: protos.google.cloud.config.v1.IListResourceDriftsRequest, + callback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>): void; + listResourceDrifts( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>, + callback?: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>): + Promise<[ + protos.google.cloud.config.v1.IResourceDrift[], + protos.google.cloud.config.v1.IListResourceDriftsRequest|null, + protos.google.cloud.config.v1.IListResourceDriftsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.config.v1.IListResourceDriftsRequest, + protos.google.cloud.config.v1.IListResourceDriftsResponse|null|undefined, + protos.google.cloud.config.v1.IResourceDrift>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listResourceDrifts values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listResourceDrifts request %j', request); + return this.innerApiCalls + .listResourceDrifts(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.config.v1.IResourceDrift[], + protos.google.cloud.config.v1.IListResourceDriftsRequest|null, + protos.google.cloud.config.v1.IListResourceDriftsResponse + ]) => { + this._log.info('listResourceDrifts values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listResourceDrifts`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + * @param {string} [request.filter] + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.config.v1.ResourceDrift|ResourceDrift} 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 `listResourceDriftsAsync()` + * 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. + */ + listResourceDriftsStream( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + 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['listResourceDrifts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceDrifts stream %j', request); + return this.descriptors.page.listResourceDrifts.createStream( + this.innerApiCalls.listResourceDrifts as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listResourceDrifts`, 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 in whose context the ResourceDrifts are listed. The + * parent value is in the format: + * 'projects/{project_id}/locations/{location}/previews/{preview}'. + * @param {number} [request.pageSize] + * Optional. When requesting a page of resource drifts, 'page_size' specifies + * number of resource drifts to return. If unspecified, at most 500 will be + * returned. The maximum value is 1000. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to 'ListResourceDrifts' which + * specifies the position in the list from where to continue listing the + * resource drifts. + * @param {string} [request.filter] + * Optional. Lists the resource drifts that match the filter expression. A + * filter expression filters the resource drifts listed in the response. The + * expression must be of the form '{field} {operator} {value}' where + * operators: '<', '>', + * '<=', + * '>=', + * '!=', '=', ':' are supported (colon ':' represents a HAS operator which is + * roughly synonymous with equality). {field} can refer to a proto or JSON + * field, or a synthetic field. Field names can be camelCase or snake_case. + * + * Examples: + * - Filter by name: + * name = + * "projects/foo/locations/us-central1/previews/dep/resourceDrifts/baz + * @param {string} [request.orderBy] + * Optional. Field to use to sort the list. + * @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.config.v1.ResourceDrift|ResourceDrift}. 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/config.list_resource_drifts.js + * region_tag:config_v1_generated_Config_ListResourceDrifts_async + */ + listResourceDriftsAsync( + request?: protos.google.cloud.config.v1.IListResourceDriftsRequest, + 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['listResourceDrifts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listResourceDrifts iterate %j', request); + return this.descriptors.page.listResourceDrifts.asyncIterate( + this.innerApiCalls['listResourceDrifts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.getIamPolicy(request, options, callback); + } + +/** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] * The function which will be called with the result of the API call. * * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. @@ -4356,6 +5078,130 @@ export class ConfigClient { return this.pathTemplates.resourcePathTemplate.match(resourceName).resource; } + /** + * Return a fully-qualified resourceChange resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} preview + * @param {string} resource_change + * @returns {string} Resource name string. + */ + resourceChangePath(project:string,location:string,preview:string,resourceChange:string) { + return this.pathTemplates.resourceChangePathTemplate.render({ + project: project, + location: location, + preview: preview, + resource_change: resourceChange, + }); + } + + /** + * Parse the project from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the project. + */ + matchProjectFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).project; + } + + /** + * Parse the location from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the location. + */ + matchLocationFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).location; + } + + /** + * Parse the preview from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the preview. + */ + matchPreviewFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).preview; + } + + /** + * Parse the resource_change from ResourceChange resource. + * + * @param {string} resourceChangeName + * A fully-qualified path representing ResourceChange resource. + * @returns {string} A string representing the resource_change. + */ + matchResourceChangeFromResourceChangeName(resourceChangeName: string) { + return this.pathTemplates.resourceChangePathTemplate.match(resourceChangeName).resource_change; + } + + /** + * Return a fully-qualified resourceDrift resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} preview + * @param {string} resource_drift + * @returns {string} Resource name string. + */ + resourceDriftPath(project:string,location:string,preview:string,resourceDrift:string) { + return this.pathTemplates.resourceDriftPathTemplate.render({ + project: project, + location: location, + preview: preview, + resource_drift: resourceDrift, + }); + } + + /** + * Parse the project from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the project. + */ + matchProjectFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).project; + } + + /** + * Parse the location from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the location. + */ + matchLocationFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).location; + } + + /** + * Parse the preview from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the preview. + */ + matchPreviewFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).preview; + } + + /** + * Parse the resource_drift from ResourceDrift resource. + * + * @param {string} resourceDriftName + * A fully-qualified path representing ResourceDrift resource. + * @returns {string} A string representing the resource_drift. + */ + matchResourceDriftFromResourceDriftName(resourceDriftName: string) { + return this.pathTemplates.resourceDriftPathTemplate.match(resourceDriftName).resource_drift; + } + /** * Return a fully-qualified revision resource name string. * diff --git a/packages/google-cloud-config/src/v1/config_client_config.json b/packages/google-cloud-config/src/v1/config_client_config.json index 3af8afd7dbe3..727ab8bb564d 100644 --- a/packages/google-cloud-config/src/v1/config_client_config.json +++ b/packages/google-cloud-config/src/v1/config_client_config.json @@ -146,6 +146,26 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListResourceChanges": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetResourceChange": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListResourceDrifts": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetResourceDrift": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" } } } diff --git a/packages/google-cloud-config/src/v1/gapic_metadata.json b/packages/google-cloud-config/src/v1/gapic_metadata.json index 3f320252b50c..f08a6825daa9 100644 --- a/packages/google-cloud-config/src/v1/gapic_metadata.json +++ b/packages/google-cloud-config/src/v1/gapic_metadata.json @@ -65,6 +65,16 @@ "getTerraformVersion" ] }, + "GetResourceChange": { + "methods": [ + "getResourceChange" + ] + }, + "GetResourceDrift": { + "methods": [ + "getResourceDrift" + ] + }, "CreateDeployment": { "methods": [ "createDeployment" @@ -134,6 +144,20 @@ "listTerraformVersionsStream", "listTerraformVersionsAsync" ] + }, + "ListResourceChanges": { + "methods": [ + "listResourceChanges", + "listResourceChangesStream", + "listResourceChangesAsync" + ] + }, + "ListResourceDrifts": { + "methods": [ + "listResourceDrifts", + "listResourceDriftsStream", + "listResourceDriftsAsync" + ] } } }, @@ -195,6 +219,16 @@ "getTerraformVersion" ] }, + "GetResourceChange": { + "methods": [ + "getResourceChange" + ] + }, + "GetResourceDrift": { + "methods": [ + "getResourceDrift" + ] + }, "CreateDeployment": { "methods": [ "createDeployment" @@ -264,6 +298,20 @@ "listTerraformVersionsStream", "listTerraformVersionsAsync" ] + }, + "ListResourceChanges": { + "methods": [ + "listResourceChanges", + "listResourceChangesStream", + "listResourceChangesAsync" + ] + }, + "ListResourceDrifts": { + "methods": [ + "listResourceDrifts", + "listResourceDriftsStream", + "listResourceDriftsAsync" + ] } } } diff --git a/packages/google-cloud-config/test/gapic_config_v1.ts b/packages/google-cloud-config/test/gapic_config_v1.ts index 1f88fba66810..73c8e89257a0 100644 --- a/packages/google-cloud-config/test/gapic_config_v1.ts +++ b/packages/google-cloud-config/test/gapic_config_v1.ts @@ -1463,6 +1463,222 @@ describe('v1.ConfigClient', () => { }); }); + describe('getResourceChange', () => { + it('invokes getResourceChange without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceChange() + ); + client.innerApiCalls.getResourceChange = stubSimpleCall(expectedResponse); + const [response] = await client.getResourceChange(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceChange without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceChange() + ); + client.innerApiCalls.getResourceChange = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getResourceChange( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceChange|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceChange with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getResourceChange = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getResourceChange(request), expectedError); + const actualRequest = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceChange as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceChange with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceChangeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceChangeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getResourceChange(request), expectedError); + }); + }); + + describe('getResourceDrift', () => { + it('invokes getResourceDrift without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceDrift() + ); + client.innerApiCalls.getResourceDrift = stubSimpleCall(expectedResponse); + const [response] = await client.getResourceDrift(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceDrift without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.config.v1.ResourceDrift() + ); + client.innerApiCalls.getResourceDrift = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getResourceDrift( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceDrift|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceDrift with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getResourceDrift = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getResourceDrift(request), expectedError); + const actualRequest = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getResourceDrift as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getResourceDrift with closed client', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.GetResourceDriftRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.GetResourceDriftRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getResourceDrift(request), expectedError); + }); + }); + describe('createDeployment', () => { it('invokes createDeployment without error', async () => { const client = new configModule.v1.ConfigClient({ @@ -3769,99 +3985,589 @@ describe('v1.ConfigClient', () => { ); }); }); - describe('getIamPolicy', () => { - it('invokes getIamPolicy without error', async () => { + + describe('listResourceChanges', () => { + it('invokes listResourceChanges without error', async () => { const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() + new protos.google.cloud.config.v1.ListResourceChangesRequest() ); - client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); - const response = await client.getIamPolicy(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.innerApiCalls.listResourceChanges = stubSimpleCall(expectedResponse); + const [response] = await client.listResourceChanges(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getIamPolicy without error using callback', async () => { + + it('invokes listResourceChanges without error using callback', async () => { const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() - ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new IamProtos.google.iam.v1.Policy() + new protos.google.cloud.config.v1.ListResourceChangesRequest() ); - client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.innerApiCalls.listResourceChanges = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.getIamPolicy( + client.listResourceChanges( request, - expectedOptions, - (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceChange[]|null) => { if (err) { reject(err); } else { resolve(result); } - }).catch(err => {throw err}); + }); }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0)); + const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes getIamPolicy with error', async () => { + + it('invokes listResourceChanges with error', async () => { const client = new configModule.v1.ConfigClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new IamProtos.google.iam.v1.GetIamPolicyRequest() + new protos.google.cloud.config.v1.ListResourceChangesRequest() ); - request.resource = ''; - const expectedHeaderRequestParams = 'resource='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); - assert((client.iamClient.getIamPolicy as SinonStub) - .getCall(0).calledWith(request, expectedOptions, undefined)); + client.innerApiCalls.listResourceChanges = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listResourceChanges(request), expectedError); + const actualRequest = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceChanges as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - }); - describe('setIamPolicy', () => { + + it('invokes listResourceChangesStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.descriptors.page.listResourceChanges.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listResourceChangesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceChange[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceChange) => { + 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.listResourceChanges.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceChanges, request)); + assert( + (client.descriptors.page.listResourceChanges.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listResourceChangesStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceChanges.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listResourceChangesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceChange[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceChange) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listResourceChanges.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceChanges, request)); + assert( + (client.descriptors.page.listResourceChanges.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceChanges without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceChange()), + ]; + client.descriptors.page.listResourceChanges.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IResourceChange[] = []; + const iterable = client.listResourceChangesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceChanges with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceChangesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceChangesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceChanges.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listResourceChangesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IResourceChange[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceChanges.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listResourceDrifts', () => { + it('invokes listResourceDrifts without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.innerApiCalls.listResourceDrifts = stubSimpleCall(expectedResponse); + const [response] = await client.listResourceDrifts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceDrifts without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.innerApiCalls.listResourceDrifts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listResourceDrifts( + request, + (err?: Error|null, result?: protos.google.cloud.config.v1.IResourceDrift[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceDrifts with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listResourceDrifts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listResourceDrifts(request), expectedError); + const actualRequest = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listResourceDrifts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listResourceDriftsStream without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.descriptors.page.listResourceDrifts.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listResourceDriftsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceDrift[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceDrift) => { + 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.listResourceDrifts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceDrifts, request)); + assert( + (client.descriptors.page.listResourceDrifts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listResourceDriftsStream with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceDrifts.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listResourceDriftsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.config.v1.ResourceDrift[] = []; + stream.on('data', (response: protos.google.cloud.config.v1.ResourceDrift) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listResourceDrifts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listResourceDrifts, request)); + assert( + (client.descriptors.page.listResourceDrifts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceDrifts without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + generateSampleMessage(new protos.google.cloud.config.v1.ResourceDrift()), + ]; + client.descriptors.page.listResourceDrifts.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.config.v1.IResourceDrift[] = []; + const iterable = client.listResourceDriftsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listResourceDrifts with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.config.v1.ListResourceDriftsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.config.v1.ListResourceDriftsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listResourceDrifts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listResourceDriftsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.config.v1.IResourceDrift[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listResourceDrifts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('setIamPolicy', () => { it('invokes setIamPolicy without error', async () => { const client = new configModule.v1.ConfigClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -4661,6 +5367,114 @@ describe('v1.ConfigClient', () => { }); }); + describe('resourceChange', async () => { + const fakePath = "/rendered/path/resourceChange"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + preview: "previewValue", + resource_change: "resourceChangeValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.resourceChangePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.resourceChangePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('resourceChangePath', () => { + const result = client.resourceChangePath("projectValue", "locationValue", "previewValue", "resourceChangeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.resourceChangePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromResourceChangeName', () => { + const result = client.matchProjectFromResourceChangeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromResourceChangeName', () => { + const result = client.matchLocationFromResourceChangeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPreviewFromResourceChangeName', () => { + const result = client.matchPreviewFromResourceChangeName(fakePath); + assert.strictEqual(result, "previewValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResourceChangeFromResourceChangeName', () => { + const result = client.matchResourceChangeFromResourceChangeName(fakePath); + assert.strictEqual(result, "resourceChangeValue"); + assert((client.pathTemplates.resourceChangePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('resourceDrift', async () => { + const fakePath = "/rendered/path/resourceDrift"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + preview: "previewValue", + resource_drift: "resourceDriftValue", + }; + const client = new configModule.v1.ConfigClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.resourceDriftPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.resourceDriftPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('resourceDriftPath', () => { + const result = client.resourceDriftPath("projectValue", "locationValue", "previewValue", "resourceDriftValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.resourceDriftPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromResourceDriftName', () => { + const result = client.matchProjectFromResourceDriftName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromResourceDriftName', () => { + const result = client.matchLocationFromResourceDriftName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchPreviewFromResourceDriftName', () => { + const result = client.matchPreviewFromResourceDriftName(fakePath); + assert.strictEqual(result, "previewValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchResourceDriftFromResourceDriftName', () => { + const result = client.matchResourceDriftFromResourceDriftName(fakePath); + assert.strictEqual(result, "resourceDriftValue"); + assert((client.pathTemplates.resourceDriftPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('revision', async () => { const fakePath = "/rendered/path/revision"; const expectedParameters = { diff --git a/packages/google-cloud-dialogflow-cx/CHANGELOG.md b/packages/google-cloud-dialogflow-cx/CHANGELOG.md index ea15fb736921..2d1a648b7914 100644 --- a/packages/google-cloud-dialogflow-cx/CHANGELOG.md +++ b/packages/google-cloud-dialogflow-cx/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [5.3.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v5.2.0...dialogflow-cx-v5.3.0) (2025-07-17) + + +### Features + +* [dialogflow-cx] Add support for generator settings on fulfillment ([#6466](https://github.com/googleapis/google-cloud-node/issues/6466)) ([02a74ee](https://github.com/googleapis/google-cloud-node/commit/02a74ee2eaa244dbb70b33b94e7884878a1457e2)) + ## [5.2.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-cx-v5.1.0...dialogflow-cx-v5.2.0) (2025-07-09) diff --git a/packages/google-cloud-dialogflow-cx/package.json b/packages/google-cloud-dialogflow-cx/package.json index a042dab79041..98aa34ab4c0c 100644 --- a/packages/google-cloud-dialogflow-cx/package.json +++ b/packages/google-cloud-dialogflow-cx/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/dialogflow-cx", - "version": "5.2.0", + "version": "5.3.0", "description": "Cx client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto index 04d3fb468e78..2635a3ca7039 100644 --- a/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto +++ b/packages/google-cloud-dialogflow-cx/protos/google/cloud/dialogflow/cx/v3/fulfillment.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.cloud.dialogflow.cx.v3; +import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/dialogflow/cx/v3/advanced_settings.proto"; import "google/cloud/dialogflow/cx/v3/response_message.proto"; @@ -89,6 +90,34 @@ message Fulfillment { repeated Case cases = 1; } + // Generator settings used by the LLM to generate a text response. + message GeneratorSettings { + // Required. The generator to call. + // Format: + // `projects//locations//agents//generators/`. + string generator = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Generator" + } + ]; + + // Map from [placeholder parameter][Generator.Parameter.id] in the + // [Generator][google.cloud.dialogflow.cx.v3.Generator] to corresponding + // session parameters. By default, Dialogflow uses the session parameter + // with the same name to fill in the generator template. e.g. If there is a + // placeholder parameter `city` in the Generator, Dialogflow default to fill + // in the `$city` with + // `$session.params.city`. However, you may choose to fill `$city` with + // `$session.params.desination-city`. + // - Map key: [parameter ID][Genrator.Parameter.id] + // - Map value: session parameter name + map input_parameters = 2; + + // Required. Output parameter which should contain the generator response. + string output_parameter = 3 [(google.api.field_behavior) = REQUIRED]; + } + // The list of rich message responses to present to the user. repeated ResponseMessage messages = 1; @@ -135,4 +164,7 @@ message Fulfillment { // fulfillment will be respected. This flag is only useful for fulfillments // associated with no-match event handlers. bool enable_generative_fallback = 12; + + // A list of Generators to be called during this fulfillment. + repeated GeneratorSettings generators = 13; } diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts index c9fc42774963..50563d770e62 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.d.ts +++ b/packages/google-cloud-dialogflow-cx/protos/protos.d.ts @@ -9302,6 +9302,9 @@ export namespace google { /** Fulfillment enableGenerativeFallback */ enableGenerativeFallback?: (boolean|null); + + /** Fulfillment generators */ + generators?: (google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings[]|null); } /** Represents a Fulfillment. */ @@ -9337,6 +9340,9 @@ export namespace google { /** Fulfillment enableGenerativeFallback. */ public enableGenerativeFallback: boolean; + /** Fulfillment generators. */ + public generators: google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings[]; + /** * Creates a new Fulfillment instance using the specified properties. * @param [properties] Properties to set @@ -9831,6 +9837,115 @@ export namespace google { } } } + + /** Properties of a GeneratorSettings. */ + interface IGeneratorSettings { + + /** GeneratorSettings generator */ + generator?: (string|null); + + /** GeneratorSettings inputParameters */ + inputParameters?: ({ [k: string]: string }|null); + + /** GeneratorSettings outputParameter */ + outputParameter?: (string|null); + } + + /** Represents a GeneratorSettings. */ + class GeneratorSettings implements IGeneratorSettings { + + /** + * Constructs a new GeneratorSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings); + + /** GeneratorSettings generator. */ + public generator: string; + + /** GeneratorSettings inputParameters. */ + public inputParameters: { [k: string]: string }; + + /** GeneratorSettings outputParameter. */ + public outputParameter: string; + + /** + * Creates a new GeneratorSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratorSettings instance + */ + public static create(properties?: google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings): google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings; + + /** + * Encodes the specified GeneratorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.verify|verify} messages. + * @param message GeneratorSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.verify|verify} messages. + * @param message GeneratorSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratorSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratorSettings + * @throws {Error} If the payload is not 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.dialogflow.cx.v3.Fulfillment.GeneratorSettings; + + /** + * Decodes a GeneratorSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratorSettings + * @throws {Error} If the payload 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.dialogflow.cx.v3.Fulfillment.GeneratorSettings; + + /** + * Verifies a GeneratorSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratorSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratorSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings; + + /** + * Creates a plain object from a GeneratorSettings message. Also converts values to other types if specified. + * @param message GeneratorSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratorSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratorSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a ResponseMessage. */ @@ -88287,6 +88402,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -88304,6 +88422,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -89004,6 +89125,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -89018,6 +89142,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -89096,6 +89223,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -89422,6 +89661,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -89436,6 +89678,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -89760,6 +90005,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -90128,6 +90476,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -90158,6 +90507,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -90207,6 +90559,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -90341,6 +90696,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -90382,6 +90740,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -91229,6 +91590,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -91255,6 +91619,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -92189,6 +92556,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -92244,6 +92614,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -92464,6 +92837,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -92702,6 +93190,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -92724,6 +93215,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -93316,6 +93810,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -93345,6 +93845,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -93467,6 +93973,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -93586,8 +94202,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -93602,8 +94221,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -94136,6 +94758,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Duration. */ interface IDuration { diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.js b/packages/google-cloud-dialogflow-cx/protos/protos.js index 8f70d0f67d3b..13eb0e36c55c 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.js +++ b/packages/google-cloud-dialogflow-cx/protos/protos.js @@ -22631,6 +22631,7 @@ * @property {Array.|null} [conditionalCases] Fulfillment conditionalCases * @property {google.cloud.dialogflow.cx.v3.IAdvancedSettings|null} [advancedSettings] Fulfillment advancedSettings * @property {boolean|null} [enableGenerativeFallback] Fulfillment enableGenerativeFallback + * @property {Array.|null} [generators] Fulfillment generators */ /** @@ -22645,6 +22646,7 @@ this.messages = []; this.setParameterActions = []; this.conditionalCases = []; + this.generators = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22715,6 +22717,14 @@ */ Fulfillment.prototype.enableGenerativeFallback = false; + /** + * Fulfillment generators. + * @member {Array.} generators + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @instance + */ + Fulfillment.prototype.generators = $util.emptyArray; + /** * Creates a new Fulfillment instance using the specified properties. * @function create @@ -22758,6 +22768,9 @@ writer.uint32(/* id 8, wireType 0 =*/64).bool(message.returnPartialResponses); if (message.enableGenerativeFallback != null && Object.hasOwnProperty.call(message, "enableGenerativeFallback")) writer.uint32(/* id 12, wireType 0 =*/96).bool(message.enableGenerativeFallback); + if (message.generators != null && message.generators.length) + for (var i = 0; i < message.generators.length; ++i) + $root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.encode(message.generators[i], writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); return writer; }; @@ -22832,6 +22845,12 @@ message.enableGenerativeFallback = reader.bool(); break; } + case 13: { + if (!(message.generators && message.generators.length)) + message.generators = []; + message.generators.push($root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22911,6 +22930,15 @@ if (message.enableGenerativeFallback != null && message.hasOwnProperty("enableGenerativeFallback")) if (typeof message.enableGenerativeFallback !== "boolean") return "enableGenerativeFallback: boolean expected"; + if (message.generators != null && message.hasOwnProperty("generators")) { + if (!Array.isArray(message.generators)) + return "generators: array expected"; + for (var i = 0; i < message.generators.length; ++i) { + var error = $root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.verify(message.generators[i]); + if (error) + return "generators." + error; + } + } return null; }; @@ -22969,6 +22997,16 @@ } if (object.enableGenerativeFallback != null) message.enableGenerativeFallback = Boolean(object.enableGenerativeFallback); + if (object.generators) { + if (!Array.isArray(object.generators)) + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.generators: array expected"); + message.generators = []; + for (var i = 0; i < object.generators.length; ++i) { + if (typeof object.generators[i] !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.generators: object expected"); + message.generators[i] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.fromObject(object.generators[i]); + } + } return message; }; @@ -22989,6 +23027,7 @@ object.messages = []; object.setParameterActions = []; object.conditionalCases = []; + object.generators = []; } if (options.defaults) { object.webhook = ""; @@ -23022,6 +23061,11 @@ object.returnPartialResponses = message.returnPartialResponses; if (message.enableGenerativeFallback != null && message.hasOwnProperty("enableGenerativeFallback")) object.enableGenerativeFallback = message.enableGenerativeFallback; + if (message.generators && message.generators.length) { + object.generators = []; + for (var j = 0; j < message.generators.length; ++j) + object.generators[j] = $root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.toObject(message.generators[j], options); + } return object; }; @@ -24025,6 +24069,294 @@ return ConditionalCases; })(); + Fulfillment.GeneratorSettings = (function() { + + /** + * Properties of a GeneratorSettings. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @interface IGeneratorSettings + * @property {string|null} [generator] GeneratorSettings generator + * @property {Object.|null} [inputParameters] GeneratorSettings inputParameters + * @property {string|null} [outputParameter] GeneratorSettings outputParameter + */ + + /** + * Constructs a new GeneratorSettings. + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment + * @classdesc Represents a GeneratorSettings. + * @implements IGeneratorSettings + * @constructor + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings=} [properties] Properties to set + */ + function GeneratorSettings(properties) { + this.inputParameters = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratorSettings generator. + * @member {string} generator + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @instance + */ + GeneratorSettings.prototype.generator = ""; + + /** + * GeneratorSettings inputParameters. + * @member {Object.} inputParameters + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @instance + */ + GeneratorSettings.prototype.inputParameters = $util.emptyObject; + + /** + * GeneratorSettings outputParameter. + * @member {string} outputParameter + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @instance + */ + GeneratorSettings.prototype.outputParameter = ""; + + /** + * Creates a new GeneratorSettings instance using the specified properties. + * @function create + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings=} [properties] Properties to set + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings} GeneratorSettings instance + */ + GeneratorSettings.create = function create(properties) { + return new GeneratorSettings(properties); + }; + + /** + * Encodes the specified GeneratorSettings message. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings} message GeneratorSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratorSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.generator != null && Object.hasOwnProperty.call(message, "generator")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.generator); + if (message.inputParameters != null && Object.hasOwnProperty.call(message, "inputParameters")) + for (var keys = Object.keys(message.inputParameters), 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.inputParameters[keys[i]]).ldelim(); + if (message.outputParameter != null && Object.hasOwnProperty.call(message, "outputParameter")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputParameter); + return writer; + }; + + /** + * Encodes the specified GeneratorSettings message, length delimited. Does not implicitly {@link google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.IGeneratorSettings} message GeneratorSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratorSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratorSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings} GeneratorSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratorSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.generator = reader.string(); + break; + } + case 2: { + if (message.inputParameters === $util.emptyObject) + message.inputParameters = {}; + 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.inputParameters[key] = value; + break; + } + case 3: { + message.outputParameter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratorSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings} GeneratorSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratorSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratorSettings message. + * @function verify + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratorSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.generator != null && message.hasOwnProperty("generator")) + if (!$util.isString(message.generator)) + return "generator: string expected"; + if (message.inputParameters != null && message.hasOwnProperty("inputParameters")) { + if (!$util.isObject(message.inputParameters)) + return "inputParameters: object expected"; + var key = Object.keys(message.inputParameters); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.inputParameters[key[i]])) + return "inputParameters: string{k:string} expected"; + } + if (message.outputParameter != null && message.hasOwnProperty("outputParameter")) + if (!$util.isString(message.outputParameter)) + return "outputParameter: string expected"; + return null; + }; + + /** + * Creates a GeneratorSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings} GeneratorSettings + */ + GeneratorSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings) + return object; + var message = new $root.google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings(); + if (object.generator != null) + message.generator = String(object.generator); + if (object.inputParameters) { + if (typeof object.inputParameters !== "object") + throw TypeError(".google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings.inputParameters: object expected"); + message.inputParameters = {}; + for (var keys = Object.keys(object.inputParameters), i = 0; i < keys.length; ++i) + message.inputParameters[keys[i]] = String(object.inputParameters[keys[i]]); + } + if (object.outputParameter != null) + message.outputParameter = String(object.outputParameter); + return message; + }; + + /** + * Creates a plain object from a GeneratorSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings} message GeneratorSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratorSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.inputParameters = {}; + if (options.defaults) { + object.generator = ""; + object.outputParameter = ""; + } + if (message.generator != null && message.hasOwnProperty("generator")) + object.generator = message.generator; + var keys2; + if (message.inputParameters && (keys2 = Object.keys(message.inputParameters)).length) { + object.inputParameters = {}; + for (var j = 0; j < keys2.length; ++j) + object.inputParameters[keys2[j]] = message.inputParameters[keys2[j]]; + } + if (message.outputParameter != null && message.hasOwnProperty("outputParameter")) + object.outputParameter = message.outputParameter; + return object; + }; + + /** + * Converts this GeneratorSettings to JSON. + * @function toJSON + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @instance + * @returns {Object.} JSON object + */ + GeneratorSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratorSettings + * @function getTypeUrl + * @memberof google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratorSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.dialogflow.cx.v3.Fulfillment.GeneratorSettings"; + }; + + return GeneratorSettings; + })(); + return Fulfillment; })(); @@ -213785,6 +214117,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -213819,6 +214152,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -213851,6 +214192,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -213902,6 +214245,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -213953,6 +214300,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -213995,6 +214347,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -214013,8 +214370,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -214022,6 +214381,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -215844,6 +216205,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -215869,6 +216231,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -215895,6 +216265,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -215935,6 +216307,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -215975,6 +216351,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -215995,6 +216376,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -216011,10 +216397,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -216044,6 +216434,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -216920,6 +217562,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -216931,6 +217574,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -216945,6 +217589,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -216971,6 +217623,9 @@ 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(); return writer; }; @@ -217001,7 +217656,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -217011,6 +217666,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -217051,6 +217729,14 @@ 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"; + } return null; }; @@ -217071,6 +217757,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -217087,10 +217780,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -217729,6 +218430,251 @@ return values; })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + /** * LaunchStage enum. * @name google.api.LaunchStage @@ -218686,6 +219632,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -218700,6 +219647,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -218724,6 +219672,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -218746,6 +219695,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -218796,6 +219746,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -218917,6 +219875,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -218989,6 +219950,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -219091,6 +220058,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -219145,6 +220119,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -219197,6 +220172,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -219260,6 +220242,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -219325,6 +220311,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -219381,6 +220368,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -219429,6 +220421,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -219534,6 +220527,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -219586,6 +220587,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -219678,6 +220681,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -219791,6 +220798,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -219890,6 +220906,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -219919,6 +220955,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -219964,6 +221001,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -222008,6 +223047,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -222068,6 +223108,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -222105,6 +223153,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -222167,6 +223217,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -222235,6 +223289,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -222284,6 +223347,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -222308,6 +223391,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -222328,6 +223412,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -224646,6 +225732,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -224766,6 +225853,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -224840,6 +225935,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -224941,6 +226038,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -225076,6 +226177,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -225264,6 +226370,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -225361,6 +226472,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -225393,6 +226505,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -225665,6 +226779,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -225706,6 +226821,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -225805,6 +226924,488 @@ return EditionDefault; })(); + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + return FieldOptions; })(); @@ -226397,6 +227998,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -226440,6 +228042,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -226478,6 +228088,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -226529,6 +228141,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -226581,6 +228197,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -226614,6 +228235,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -226646,6 +228272,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -226653,6 +228280,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -228120,6 +229749,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -228185,6 +229816,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -228221,6 +229868,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -228281,6 +229932,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -228371,6 +230030,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -228510,6 +230189,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -228533,6 +230260,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -228546,6 +230275,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -228673,6 +230406,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -228857,6 +230803,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -228874,6 +230821,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -228922,6 +230870,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -228974,6 +230926,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -229082,7 +231038,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -229109,12 +231066,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -229140,10 +231105,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -229184,8 +231151,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -229228,6 +231199,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -229240,10 +231212,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -229271,6 +231248,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -229312,10 +231293,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -229334,13 +231320,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -230555,6 +232544,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Duration = (function() { /** diff --git a/packages/google-cloud-dialogflow-cx/protos/protos.json b/packages/google-cloud-dialogflow-cx/protos/protos.json index 9dd2a988843e..a5da64fc92b3 100644 --- a/packages/google-cloud-dialogflow-cx/protos/protos.json +++ b/packages/google-cloud-dialogflow-cx/protos/protos.json @@ -2517,6 +2517,11 @@ "enableGenerativeFallback": { "type": "bool", "id": 12 + }, + "generators": { + "rule": "repeated", + "type": "GeneratorSettings", + "id": 13 } }, "nested": { @@ -2577,6 +2582,30 @@ } } } + }, + "GeneratorSettings": { + "fields": { + "generator": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dialogflow.googleapis.com/Generator" + } + }, + "inputParameters": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "outputParameter": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } } } }, @@ -22665,8 +22694,7 @@ "java_multiple_files": true, "java_outer_classname": "ResourceProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "fieldBehavior": { @@ -22812,6 +22840,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -22952,6 +22984,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -23009,6 +23063,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -23070,6 +23129,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -23180,12 +23252,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -23224,6 +23303,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -23312,6 +23396,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -23537,6 +23625,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -23751,6 +23843,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -23886,7 +23979,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -23914,6 +24008,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -23983,6 +24081,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -24071,6 +24189,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -24213,6 +24335,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -24223,6 +24346,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -24233,6 +24357,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -24243,6 +24368,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -24253,7 +24379,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -24263,27 +24390,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -24328,7 +24466,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -24343,6 +24487,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -24370,11 +24541,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -24387,6 +24573,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -24472,6 +24664,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Duration": { "fields": { "seconds": { @@ -24593,6 +24793,7 @@ "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", "php_namespace": "Google\\LongRunning" }, "nested": { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json index e68f5e4a6719..523ab16b5284 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata.google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "5.2.0", + "version": "5.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json index 722d957eec58..049fefc08c70 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3/snippet_metadata_google.cloud.dialogflow.cx.v3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "5.2.0", + "version": "5.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json index 8ab03f9b5576..5bfab62191ce 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata.google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "5.2.0", + "version": "5.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json index fb587737cbad..d98164dda5f5 100644 --- a/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json +++ b/packages/google-cloud-dialogflow-cx/samples/generated/v3beta1/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cx", - "version": "5.2.0", + "version": "5.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow-cx/samples/package.json b/packages/google-cloud-dialogflow-cx/samples/package.json index 1e40cebd1fdd..7d0a6a36a095 100644 --- a/packages/google-cloud-dialogflow-cx/samples/package.json +++ b/packages/google-cloud-dialogflow-cx/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/dialogflow-cx": "^5.2.0", + "@google-cloud/dialogflow-cx": "^5.3.0", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-licensemanager/.OwlBot.yaml b/packages/google-cloud-licensemanager/.OwlBot.yaml new file mode 100644 index 000000000000..5df78fd1e68a --- /dev/null +++ b/packages/google-cloud-licensemanager/.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/cloud/licensemanager/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-licensemanager/$1 + +api-name: licensemanager \ No newline at end of file diff --git a/packages/google-cloud-licensemanager/.eslintignore b/packages/google-cloud-licensemanager/.eslintignore new file mode 100644 index 000000000000..ea5b04aebe68 --- /dev/null +++ b/packages/google-cloud-licensemanager/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-licensemanager/.eslintrc.json b/packages/google-cloud-licensemanager/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/google-cloud-licensemanager/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-licensemanager/.gitattributes b/packages/google-cloud-licensemanager/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-licensemanager/.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-cloud-licensemanager/.gitignore b/packages/google-cloud-licensemanager/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/google-cloud-licensemanager/.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-cloud-licensemanager/.jsdoc.js b/packages/google-cloud-licensemanager/.jsdoc.js new file mode 100644 index 000000000000..8c1fa32b4856 --- /dev/null +++ b/packages/google-cloud-licensemanager/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/licensemanager', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-licensemanager/.mocharc.js b/packages/google-cloud-licensemanager/.mocharc.js new file mode 100644 index 000000000000..eef6173ab449 --- /dev/null +++ b/packages/google-cloud-licensemanager/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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-cloud-licensemanager/.nycrc b/packages/google-cloud-licensemanager/.nycrc new file mode 100644 index 000000000000..b18d5472b62b --- /dev/null +++ b/packages/google-cloud-licensemanager/.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-cloud-licensemanager/.prettierignore b/packages/google-cloud-licensemanager/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/google-cloud-licensemanager/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-licensemanager/.prettierrc.js b/packages/google-cloud-licensemanager/.prettierrc.js new file mode 100644 index 000000000000..b189724933b2 --- /dev/null +++ b/packages/google-cloud-licensemanager/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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-cloud-licensemanager/.repo-metadata.json b/packages/google-cloud-licensemanager/.repo-metadata.json new file mode 100644 index 000000000000..8d58ed05b3c9 --- /dev/null +++ b/packages/google-cloud-licensemanager/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "licensemanager", + "name_pretty": "License Manager API", + "product_documentation": "https://cloud.google.com/compute/docs/instances/windows/ms-licensing", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/licensemanager/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/licensemanager", + "api_id": "licensemanager.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "licensemanager" +} + diff --git a/packages/google-cloud-licensemanager/CHANGELOG.md b/packages/google-cloud-licensemanager/CHANGELOG.md new file mode 100644 index 000000000000..23cff2dcc326 --- /dev/null +++ b/packages/google-cloud-licensemanager/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## 0.1.0 (2025-07-17) + + +### Features + +* Add initial files for google.cloud.licensemanager.v1 ([#6493](https://github.com/googleapis/google-cloud-node/issues/6493)) ([06390df](https://github.com/googleapis/google-cloud-node/commit/06390df47b477de5a89ecc4bc525372865d62cc3)) diff --git a/packages/google-cloud-licensemanager/CODE_OF_CONDUCT.md b/packages/google-cloud-licensemanager/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-licensemanager/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-cloud-licensemanager/CONTRIBUTING.md b/packages/google-cloud-licensemanager/CONTRIBUTING.md new file mode 100644 index 000000000000..3f4baaea2eba --- /dev/null +++ b/packages/google-cloud-licensemanager/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 License Manager 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=licensemanager.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-licensemanager/LICENSE b/packages/google-cloud-licensemanager/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-licensemanager/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-cloud-licensemanager/README.md b/packages/google-cloud-licensemanager/README.md new file mode 100644 index 000000000000..729fbfd6a7f7 --- /dev/null +++ b/packages/google-cloud-licensemanager/README.md @@ -0,0 +1,201 @@ +[//]: # "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 + +# [License Manager API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-licensemanager) + +[![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-cloud/licensemanager.svg)](https://www.npmjs.org/package/@google-cloud/licensemanager) + + + + +License Manager 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-cloud-licensemanager/CHANGELOG.md). + +* [License Manager API Node.js Client API Reference][client-docs] +* [License Manager API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-licensemanager](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-licensemanager) + +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 License Manager API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/licensemanager +``` + + +### 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. Parent value for ListInstancesRequest + */ +// const parent = 'abc123' +/** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ +// const pageSize = 1234 +/** + * Optional. A token identifying a page of results the server should return. + */ +// const pageToken = 'abc123' +/** + * Optional. Filtering results + */ +// const filter = 'abc123' +/** + * Optional. Hint for how to order the results + */ +// const orderBy = 'abc123' + +// Imports the Licensemanager library +const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + +// Instantiates a client +const licensemanagerClient = new LicenseManagerClient(); + +async function callListInstances() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = licensemanagerClient.listInstancesAsync(request); + for await (const response of iterable) { + console.log(response); + } +} + +callListInstances(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-licensemanager/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| License_manager.aggregate_usage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.create_configuration | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.deactivate_configuration | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.delete_configuration | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.get_configuration | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.get_instance | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.list_configurations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.list_instances | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.query_configuration_license_usage | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.reactivate_configuration | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js,packages/google-cloud-licensemanager/samples/README.md) | +| License_manager.update_configuration | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js,packages/google-cloud-licensemanager/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/quickstart.js,packages/google-cloud-licensemanager/samples/README.md) | + + + +The [License Manager 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-cloud/licensemanager@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/licensemanager/latest +[product-docs]: https://cloud.google.com/compute/docs/instances/windows/ms-licensing +[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=licensemanager.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-licensemanager/package.json b/packages/google-cloud-licensemanager/package.json new file mode 100644 index 000000000000..061db875718c --- /dev/null +++ b/packages/google-cloud-licensemanager/package.json @@ -0,0 +1,70 @@ +{ + "name": "@google-cloud/licensemanager", + "version": "0.1.0", + "description": "License Manager API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-cloud-licensemanager" + }, + "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-cloud-licensemanager", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google licensemanager", + "licensemanager", + "License Manager API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "postpack": "minifyProtoJson", + "prepare": "npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^5.0.0" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.13.9", + "@types/sinon": "^17.0.4", + "c8": "^10.1.3", + "gapic-tools": "^1.0.0", + "gts": "^6.0.2", + "jsdoc": "^4.0.4", + "jsdoc-fresh": "^4.0.0", + "jsdoc-region-tag": "^3.0.0", + "linkinator": "^6.1.2", + "long": "^5.3.1", + "mocha": "^11.1.0", + "pack-n-play": "^3.0.0", + "sinon": "^21.0.0", + "typescript": "^5.8.2" + }, + "engines": { + "node": ">=18.0.0" + } +} diff --git a/packages/google-cloud-licensemanager/protos/google/cloud/licensemanager/v1/api_entities.proto b/packages/google-cloud-licensemanager/protos/google/cloud/licensemanager/v1/api_entities.proto new file mode 100644 index 000000000000..e36a9b65fd16 --- /dev/null +++ b/packages/google-cloud-licensemanager/protos/google/cloud/licensemanager/v1/api_entities.proto @@ -0,0 +1,295 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.licensemanager.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.LicenseManager.V1"; +option go_package = "cloud.google.com/go/licensemanager/apiv1/licensemanagerpb;licensemanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "ApiEntitiesProto"; +option java_package = "com.google.cloud.licensemanager.v1"; +option php_namespace = "Google\\Cloud\\LicenseManager\\V1"; +option ruby_package = "Google::Cloud::LicenseManager::V1"; + +// Different types of licenses that are supported. +enum LicenseType { + // unspecified. + LICENSE_TYPE_UNSPECIFIED = 0; + + // Billing will be based on number of users listed per month. + LICENSE_TYPE_PER_MONTH_PER_USER = 1; + + // Bring your own license. + LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2; +} + +// State of the License Key activation on the instance. +enum ActivationState { + // The Status of the activation is unspecified + ACTIVATION_STATE_UNSPECIFIED = 0; + + // Activation key (MAK) requested for the instance. + ACTIVATION_STATE_KEY_REQUESTED = 1; + + // License activation process is running on the instance. + ACTIVATION_STATE_ACTIVATING = 2; + + // License activation is complete on the instance. + ACTIVATION_STATE_ACTIVATED = 3; + + // License Key is deactivating on the instance. + ACTIVATION_STATE_DEACTIVATING = 4; + + // License Key is deactivated on the instance. + ACTIVATION_STATE_DEACTIVATED = 5; + + // License Key activation failed on the instance. + ACTIVATION_STATE_TERMINATED = 6; +} + +// Configuration for a Google SPLA product +message Configuration { + option (google.api.resource) = { + type: "licensemanager.googleapis.com/Configuration" + pattern: "projects/{project}/locations/{location}/configurations/{configuration}" + plural: "configurations" + singular: "configuration" + }; + + // State of the configuration. + enum State { + // The Status of the configuration is unspecified + STATE_UNSPECIFIED = 0; + + // Configuration is in active state. + STATE_ACTIVE = 1; + + // Configuration is in deactivated state. + STATE_SUSPENDED = 2; + + // Configuration is in deleted state. + STATE_DELETED = 3; + } + + // Identifier. name of resource + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. User given name. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name field (with URL) of the Product offered for SPLA. + string product = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Product" + } + ]; + + // Required. LicenseType to be applied for billing + LicenseType license_type = 7 [(google.api.field_behavior) = REQUIRED]; + + // Required. Billing information applicable till end of the current month. + BillingInfo current_billing_info = 8 [(google.api.field_behavior) = REQUIRED]; + + // Required. Billing information applicable for next month. + BillingInfo next_billing_info = 9 [(google.api.field_behavior) = REQUIRED]; + + // Output only. [Output only] Create time stamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. State of the configuration. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Billing Information. +message BillingInfo { + oneof current_billing_info { + // Required. This type of billing uses user count for computing total + // charge. + UserCountBillingInfo user_count_billing = 1 + [(google.api.field_behavior) = REQUIRED]; + } + + // Output only. When the billing starts. + google.protobuf.Timestamp start_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the billing ends. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This approach uses total unique user count for billing. +message UserCountBillingInfo { + // Required. Number of users to bill for. + int32 user_count = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Message representing usage for license configurations which use user-count +// billing. +message UserCountUsage { + // Required. Unique number of licensed users. + int32 unique_user_count = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Products for Google SPLA. +message Product { + option (google.api.resource) = { + type: "licensemanager.googleapis.com/Product" + pattern: "projects/{project}/locations/{location}/products/{product}" + plural: "products" + singular: "product" + }; + + // State of the product. + enum State { + // The Status of the product is unknown. + STATE_UNSPECIFIED = 0; + + // Product is under provisioning stage. + STATE_PROVISIONING = 1; + + // Product is ok to run on instances. + STATE_RUNNING = 2; + + // The product is about to terminate or has been announced for termination. + STATE_TERMINATING = 3; + + // The product has been terminated. + STATE_TERMINATED = 4; + } + + // Identifier. Full name of the product resource. + // ex "projects/1/locations/us-central1/products/office-2021" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Version of the product. + string version = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Company that released the product. + string product_company = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. State of the product. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. SKU for mapping to the Billing/Subscription resource. + string sku = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Human-readable, detailed description of the Product + string description = 6 [(google.api.field_behavior) = REQUIRED]; + + // Required. Human-readable name of the Product + string display_name = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// Message describing Instance object +message Instance { + option (google.api.resource) = { + type: "licensemanager.googleapis.com/Instance" + pattern: "projects/{project}/locations/{location}/instances/{instance}" + plural: "instances" + singular: "instance" + }; + + // VM status enum. + enum State { + // The Status of the VM is unspecified. + STATE_UNSPECIFIED = 0; + + // Resources are being allocated for the instance. + PROVISIONING = 1; + + // All required resources have been allocated and + // the instance is being started. + STAGING = 2; + + // The instance is running. + RUNNING = 3; + + // The instance is currently stopping (either being deleted or terminated). + STOPPING = 4; + + // The instance has stopped due to various reasons (user request, VM + // preemption, project freezing, etc.). + STOPPED = 5; + + // The instance has failed in some way. + TERMINATED = 6; + + // The instance is in repair. + REPAIRING = 7; + } + + // Identifier. name of resource + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. [Output only] Create time stamp + google.protobuf.Timestamp create_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. [Output only] Update time stamp + google.protobuf.Timestamp update_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels as key value pairs + map labels = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The state of the VM. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location of the VM. + string region = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Map with Product_Name and Activation State of the VM. + map product_activation = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. license version id. + string license_version_id = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Compute Instance resource name, i.e. + // projects/{project}/zones/{zone}/instances/{instance} + string compute_instance = 9 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "compute.googleapis.com/ComputeInstance" + } + ]; +} + +// Message describing total counts of users who accessed a VM. +message Usage { + // LiMa Instance resource name, i.e. + // projects/{project}/locations/{location}/instances/{instance} + string lima_instance = 1 [(google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Instance" + }]; + + // Number of unique users accessing the VM. + int32 users = 2; +} diff --git a/packages/google-cloud-licensemanager/protos/google/cloud/licensemanager/v1/licensemanager.proto b/packages/google-cloud-licensemanager/protos/google/cloud/licensemanager/v1/licensemanager.proto new file mode 100644 index 000000000000..b6a2507b1817 --- /dev/null +++ b/packages/google-cloud-licensemanager/protos/google/cloud/licensemanager/v1/licensemanager.proto @@ -0,0 +1,586 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.licensemanager.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/field_info.proto"; +import "google/api/resource.proto"; +import "google/cloud/licensemanager/v1/api_entities.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.LicenseManager.V1"; +option go_package = "cloud.google.com/go/licensemanager/apiv1/licensemanagerpb;licensemanagerpb"; +option java_multiple_files = true; +option java_outer_classname = "LicenseManagerProto"; +option java_package = "com.google.cloud.licensemanager.v1"; +option php_namespace = "Google\\Cloud\\LicenseManager\\V1"; +option ruby_package = "Google::Cloud::LicenseManager::V1"; +option (google.api.resource_definition) = { + type: "compute.googleapis.com/ComputeInstance" + pattern: "projects/{project}/zones/{zone}/instances/{instance}" +}; + +// Service describing handlers for resources +service LicenseManager { + option (google.api.default_host) = "licensemanager.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists Configurations in a given project and location. + rpc ListConfigurations(ListConfigurationsRequest) + returns (ListConfigurationsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/configurations" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Configuration. + rpc GetConfiguration(GetConfigurationRequest) returns (Configuration) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/configurations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new Configuration in a given project and location. + rpc CreateConfiguration(CreateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/configurations" + body: "configuration" + }; + option (google.api.method_signature) = + "parent,configuration,configuration_id"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // Updates the parameters of a single Configuration. + rpc UpdateConfiguration(UpdateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{configuration.name=projects/*/locations/*/configurations/*}" + body: "configuration" + }; + option (google.api.method_signature) = "configuration,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a single Configuration. + rpc DeleteConfiguration(DeleteConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/configurations/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Instances in a given project and location. + rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/instances" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Instance. + rpc GetInstance(GetInstanceRequest) returns (Instance) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/instances/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deactivates the given configuration. + rpc DeactivateConfiguration(DeactivateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/configurations/*}:deactivate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // Reactivates the given configuration. + rpc ReactivateConfiguration(ReactivateConfigurationRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/configurations/*}:reactivate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "Configuration" + metadata_type: "OperationMetadata" + }; + } + + // License Usage information for a Configuration. + rpc QueryConfigurationLicenseUsage(QueryConfigurationLicenseUsageRequest) + returns (QueryConfigurationLicenseUsageResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/configurations/*}:queryLicenseUsage" + }; + option (google.api.method_signature) = "name,start_time,end_time"; + } + + // Aggregates Usage per Instance for a Configuration. + rpc AggregateUsage(AggregateUsageRequest) returns (AggregateUsageResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/configurations/*}:aggregateUsage" + }; + option (google.api.method_signature) = "name,start_time,end_time"; + } + + // Lists Products in a given project and location. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/products" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single Product. + rpc GetProduct(GetProductRequest) returns (Product) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/products/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Message for requesting list of Configurations +message ListConfigurationsRequest { + // Required. Parent value for ListConfigurationsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Configurations +message ListConfigurationsResponse { + // The list of Configuration + repeated Configuration configurations = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Configuration +message GetConfigurationRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; +} + +// Message for creating a Configuration +message CreateConfigurationRequest { + // Required. Value for parent. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Required. Id of the requesting object + string configuration_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource being created + Configuration configuration = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for updating a Configuration +message UpdateConfigurationRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // Configuration resource by the update. + // The fields specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the mask. If the + // user does not provide a mask then all fields will be overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The resource being updated + Configuration configuration = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for deleting a Configuration +message DeleteConfigurationRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for requesting list of Instances +message ListInstancesRequest { + // Required. Parent value for ListInstancesRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Instance" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Instances +message ListInstancesResponse { + // The list of Instance + repeated Instance instances = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Instance +message GetInstanceRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Instance" + } + ]; +} + +// Message for requesting license usage per configuration. +message QueryConfigurationLicenseUsageRequest { + // Required. The resource path of the Configuration. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Required. The start time for retrieving the usage. If not specified, we + // will use the first day of the current billing period. + google.protobuf.Timestamp start_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The end time for retrieving the usage. If not specified, we will + // use the last day of the current billing period. + google.protobuf.Timestamp end_time = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message for response to get the license usage per configuration. +message QueryConfigurationLicenseUsageResponse { + // Depending on the type of the configuration, one of the following + // will be populated. + oneof details { + // Usage information for license types which use user-count billing. + UserCountUsage user_count_usage = 1; + } +} + +// Message for deactivating a Configuration. +message DeactivateConfigurationRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for resuming a Configuration. +message ReactivateConfigurationRequest { + // Required. Name of the resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. An optional request ID to identify requests. Specify a unique + // request ID so that if you must retry your request, the server will know to + // ignore the request if it has already been completed. The server will + // guarantee that for at least 60 minutes after the first request. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [ + (google.api.field_info).format = UUID4, + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Message for requesting aggregate of Usage per configuration. +message AggregateUsageRequest { + // Required. Parent value for AggregateUsageRequest + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Configuration" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Licenses are purchased per month - so usage track needs start + // time of a month. + google.protobuf.Timestamp start_time = 7 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Usage track is always for a month. This parameter is for the end + // time of the month. + google.protobuf.Timestamp end_time = 8 + [(google.api.field_behavior) = REQUIRED]; +} + +// Message for response for aggregating usage count +message AggregateUsageResponse { + // The aggregated records of usage per configuration + repeated Usage usages = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for requesting list of Products +message ListProductsRequest { + // Required. Parent value for ListProductsRequest + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "licensemanager.googleapis.com/Product" + } + ]; + + // Optional. Requested page size. Server may return fewer items than + // requested. If unspecified, server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results the server should return. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filtering results + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Hint for how to order the results + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message for response to listing Products +message ListProductsResponse { + // The list of Product + repeated Product products = 1; + + // A token identifying a page of results the server should return. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable = 3; +} + +// Message for getting a Product +message GetProductRequest { + // Required. Name of the resource + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "licensemanager.googleapis.com/Product" + } + ]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // 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. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have been cancelled successfully + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-licensemanager/protos/protos.d.ts b/packages/google-cloud-licensemanager/protos/protos.d.ts new file mode 100644 index 000000000000..fbf8ba8ea23b --- /dev/null +++ b/packages/google-cloud-licensemanager/protos/protos.d.ts @@ -0,0 +1,11865 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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 cloud. */ + namespace cloud { + + /** Namespace licensemanager. */ + namespace licensemanager { + + /** Namespace v1. */ + namespace v1 { + + /** LicenseType enum. */ + enum LicenseType { + LICENSE_TYPE_UNSPECIFIED = 0, + LICENSE_TYPE_PER_MONTH_PER_USER = 1, + LICENSE_TYPE_BRING_YOUR_OWN_LICENSE = 2 + } + + /** ActivationState enum. */ + enum ActivationState { + ACTIVATION_STATE_UNSPECIFIED = 0, + ACTIVATION_STATE_KEY_REQUESTED = 1, + ACTIVATION_STATE_ACTIVATING = 2, + ACTIVATION_STATE_ACTIVATED = 3, + ACTIVATION_STATE_DEACTIVATING = 4, + ACTIVATION_STATE_DEACTIVATED = 5, + ACTIVATION_STATE_TERMINATED = 6 + } + + /** Properties of a Configuration. */ + interface IConfiguration { + + /** Configuration name */ + name?: (string|null); + + /** Configuration displayName */ + displayName?: (string|null); + + /** Configuration product */ + product?: (string|null); + + /** Configuration licenseType */ + licenseType?: (google.cloud.licensemanager.v1.LicenseType|keyof typeof google.cloud.licensemanager.v1.LicenseType|null); + + /** Configuration currentBillingInfo */ + currentBillingInfo?: (google.cloud.licensemanager.v1.IBillingInfo|null); + + /** Configuration nextBillingInfo */ + nextBillingInfo?: (google.cloud.licensemanager.v1.IBillingInfo|null); + + /** Configuration createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Configuration updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Configuration labels */ + labels?: ({ [k: string]: string }|null); + + /** Configuration state */ + state?: (google.cloud.licensemanager.v1.Configuration.State|keyof typeof google.cloud.licensemanager.v1.Configuration.State|null); + } + + /** Represents a Configuration. */ + class Configuration implements IConfiguration { + + /** + * Constructs a new Configuration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IConfiguration); + + /** Configuration name. */ + public name: string; + + /** Configuration displayName. */ + public displayName: string; + + /** Configuration product. */ + public product: string; + + /** Configuration licenseType. */ + public licenseType: (google.cloud.licensemanager.v1.LicenseType|keyof typeof google.cloud.licensemanager.v1.LicenseType); + + /** Configuration currentBillingInfo. */ + public currentBillingInfo?: (google.cloud.licensemanager.v1.IBillingInfo|null); + + /** Configuration nextBillingInfo. */ + public nextBillingInfo?: (google.cloud.licensemanager.v1.IBillingInfo|null); + + /** Configuration createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Configuration updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Configuration labels. */ + public labels: { [k: string]: string }; + + /** Configuration state. */ + public state: (google.cloud.licensemanager.v1.Configuration.State|keyof typeof google.cloud.licensemanager.v1.Configuration.State); + + /** + * Creates a new Configuration instance using the specified properties. + * @param [properties] Properties to set + * @returns Configuration instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IConfiguration): google.cloud.licensemanager.v1.Configuration; + + /** + * Encodes the specified Configuration message. Does not implicitly {@link google.cloud.licensemanager.v1.Configuration.verify|verify} messages. + * @param message Configuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Configuration message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Configuration.verify|verify} messages. + * @param message Configuration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IConfiguration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Configuration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Configuration + * @throws {Error} If the payload is not 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.licensemanager.v1.Configuration; + + /** + * Decodes a Configuration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Configuration + * @throws {Error} If the payload 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.licensemanager.v1.Configuration; + + /** + * Verifies a Configuration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Configuration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Configuration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.Configuration; + + /** + * Creates a plain object from a Configuration message. Also converts values to other types if specified. + * @param message Configuration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.Configuration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Configuration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Configuration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Configuration { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STATE_ACTIVE = 1, + STATE_SUSPENDED = 2, + STATE_DELETED = 3 + } + } + + /** Properties of a BillingInfo. */ + interface IBillingInfo { + + /** BillingInfo userCountBilling */ + userCountBilling?: (google.cloud.licensemanager.v1.IUserCountBillingInfo|null); + + /** BillingInfo startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** BillingInfo endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a BillingInfo. */ + class BillingInfo implements IBillingInfo { + + /** + * Constructs a new BillingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IBillingInfo); + + /** BillingInfo userCountBilling. */ + public userCountBilling?: (google.cloud.licensemanager.v1.IUserCountBillingInfo|null); + + /** BillingInfo startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** BillingInfo endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BillingInfo currentBillingInfo. */ + public currentBillingInfo?: "userCountBilling"; + + /** + * Creates a new BillingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns BillingInfo instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IBillingInfo): google.cloud.licensemanager.v1.BillingInfo; + + /** + * Encodes the specified BillingInfo message. Does not implicitly {@link google.cloud.licensemanager.v1.BillingInfo.verify|verify} messages. + * @param message BillingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IBillingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BillingInfo message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.BillingInfo.verify|verify} messages. + * @param message BillingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IBillingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BillingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BillingInfo + * @throws {Error} If the payload is not 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.licensemanager.v1.BillingInfo; + + /** + * Decodes a BillingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BillingInfo + * @throws {Error} If the payload 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.licensemanager.v1.BillingInfo; + + /** + * Verifies a BillingInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BillingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BillingInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.BillingInfo; + + /** + * Creates a plain object from a BillingInfo message. Also converts values to other types if specified. + * @param message BillingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.BillingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BillingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BillingInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserCountBillingInfo. */ + interface IUserCountBillingInfo { + + /** UserCountBillingInfo userCount */ + userCount?: (number|null); + } + + /** Represents a UserCountBillingInfo. */ + class UserCountBillingInfo implements IUserCountBillingInfo { + + /** + * Constructs a new UserCountBillingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IUserCountBillingInfo); + + /** UserCountBillingInfo userCount. */ + public userCount: number; + + /** + * Creates a new UserCountBillingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns UserCountBillingInfo instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IUserCountBillingInfo): google.cloud.licensemanager.v1.UserCountBillingInfo; + + /** + * Encodes the specified UserCountBillingInfo message. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountBillingInfo.verify|verify} messages. + * @param message UserCountBillingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IUserCountBillingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserCountBillingInfo message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountBillingInfo.verify|verify} messages. + * @param message UserCountBillingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IUserCountBillingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserCountBillingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserCountBillingInfo + * @throws {Error} If the payload is not 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.licensemanager.v1.UserCountBillingInfo; + + /** + * Decodes a UserCountBillingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserCountBillingInfo + * @throws {Error} If the payload 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.licensemanager.v1.UserCountBillingInfo; + + /** + * Verifies a UserCountBillingInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserCountBillingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserCountBillingInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.UserCountBillingInfo; + + /** + * Creates a plain object from a UserCountBillingInfo message. Also converts values to other types if specified. + * @param message UserCountBillingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.UserCountBillingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserCountBillingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserCountBillingInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserCountUsage. */ + interface IUserCountUsage { + + /** UserCountUsage uniqueUserCount */ + uniqueUserCount?: (number|null); + } + + /** Represents a UserCountUsage. */ + class UserCountUsage implements IUserCountUsage { + + /** + * Constructs a new UserCountUsage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IUserCountUsage); + + /** UserCountUsage uniqueUserCount. */ + public uniqueUserCount: number; + + /** + * Creates a new UserCountUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns UserCountUsage instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IUserCountUsage): google.cloud.licensemanager.v1.UserCountUsage; + + /** + * Encodes the specified UserCountUsage message. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountUsage.verify|verify} messages. + * @param message UserCountUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IUserCountUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserCountUsage message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountUsage.verify|verify} messages. + * @param message UserCountUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IUserCountUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserCountUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserCountUsage + * @throws {Error} If the payload is not 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.licensemanager.v1.UserCountUsage; + + /** + * Decodes a UserCountUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserCountUsage + * @throws {Error} If the payload 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.licensemanager.v1.UserCountUsage; + + /** + * Verifies a UserCountUsage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserCountUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserCountUsage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.UserCountUsage; + + /** + * Creates a plain object from a UserCountUsage message. Also converts values to other types if specified. + * @param message UserCountUsage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.UserCountUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserCountUsage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserCountUsage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Product. */ + interface IProduct { + + /** Product name */ + name?: (string|null); + + /** Product version */ + version?: (string|null); + + /** Product productCompany */ + productCompany?: (string|null); + + /** Product state */ + state?: (google.cloud.licensemanager.v1.Product.State|keyof typeof google.cloud.licensemanager.v1.Product.State|null); + + /** Product sku */ + sku?: (string|null); + + /** Product description */ + description?: (string|null); + + /** Product displayName */ + displayName?: (string|null); + } + + /** Represents a Product. */ + class Product implements IProduct { + + /** + * Constructs a new Product. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IProduct); + + /** Product name. */ + public name: string; + + /** Product version. */ + public version: string; + + /** Product productCompany. */ + public productCompany: string; + + /** Product state. */ + public state: (google.cloud.licensemanager.v1.Product.State|keyof typeof google.cloud.licensemanager.v1.Product.State); + + /** Product sku. */ + public sku: string; + + /** Product description. */ + public description: string; + + /** Product displayName. */ + public displayName: string; + + /** + * Creates a new Product instance using the specified properties. + * @param [properties] Properties to set + * @returns Product instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IProduct): google.cloud.licensemanager.v1.Product; + + /** + * Encodes the specified Product message. Does not implicitly {@link google.cloud.licensemanager.v1.Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Product.verify|verify} messages. + * @param message Product message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IProduct, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Product message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Product + * @throws {Error} If the payload is not 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.licensemanager.v1.Product; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Product + * @throws {Error} If the payload 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.licensemanager.v1.Product; + + /** + * Verifies a Product message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Product message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Product + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.Product; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @param message Product + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.Product, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Product to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Product + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Product { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + STATE_PROVISIONING = 1, + STATE_RUNNING = 2, + STATE_TERMINATING = 3, + STATE_TERMINATED = 4 + } + } + + /** Properties of an Instance. */ + interface IInstance { + + /** Instance name */ + name?: (string|null); + + /** Instance createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Instance updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Instance labels */ + labels?: ({ [k: string]: string }|null); + + /** Instance state */ + state?: (google.cloud.licensemanager.v1.Instance.State|keyof typeof google.cloud.licensemanager.v1.Instance.State|null); + + /** Instance region */ + region?: (string|null); + + /** Instance productActivation */ + productActivation?: ({ [k: string]: google.cloud.licensemanager.v1.ActivationState }|null); + + /** Instance licenseVersionId */ + licenseVersionId?: (string|null); + + /** Instance computeInstance */ + computeInstance?: (string|null); + } + + /** Represents an Instance. */ + class Instance implements IInstance { + + /** + * Constructs a new Instance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IInstance); + + /** Instance name. */ + public name: string; + + /** Instance createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Instance updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Instance labels. */ + public labels: { [k: string]: string }; + + /** Instance state. */ + public state: (google.cloud.licensemanager.v1.Instance.State|keyof typeof google.cloud.licensemanager.v1.Instance.State); + + /** Instance region. */ + public region: string; + + /** Instance productActivation. */ + public productActivation: { [k: string]: google.cloud.licensemanager.v1.ActivationState }; + + /** Instance licenseVersionId. */ + public licenseVersionId: string; + + /** Instance computeInstance. */ + public computeInstance: string; + + /** + * Creates a new Instance instance using the specified properties. + * @param [properties] Properties to set + * @returns Instance instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IInstance): google.cloud.licensemanager.v1.Instance; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.licensemanager.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Instance.verify|verify} messages. + * @param message Instance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Instance + * @throws {Error} If the payload is not 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.licensemanager.v1.Instance; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Instance + * @throws {Error} If the payload 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.licensemanager.v1.Instance; + + /** + * Verifies an Instance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Instance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.Instance; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @param message Instance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.Instance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Instance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Instance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Instance { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PROVISIONING = 1, + STAGING = 2, + RUNNING = 3, + STOPPING = 4, + STOPPED = 5, + TERMINATED = 6, + REPAIRING = 7 + } + } + + /** Properties of a Usage. */ + interface IUsage { + + /** Usage limaInstance */ + limaInstance?: (string|null); + + /** Usage users */ + users?: (number|null); + } + + /** Represents a Usage. */ + class Usage implements IUsage { + + /** + * Constructs a new Usage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IUsage); + + /** Usage limaInstance. */ + public limaInstance: string; + + /** Usage users. */ + public users: number; + + /** + * Creates a new Usage instance using the specified properties. + * @param [properties] Properties to set + * @returns Usage instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IUsage): google.cloud.licensemanager.v1.Usage; + + /** + * Encodes the specified Usage message. Does not implicitly {@link google.cloud.licensemanager.v1.Usage.verify|verify} messages. + * @param message Usage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Usage message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Usage.verify|verify} messages. + * @param message Usage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Usage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Usage + * @throws {Error} If the payload is not 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.licensemanager.v1.Usage; + + /** + * Decodes a Usage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Usage + * @throws {Error} If the payload 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.licensemanager.v1.Usage; + + /** + * Verifies a Usage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Usage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Usage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.Usage; + + /** + * Creates a plain object from a Usage message. Also converts values to other types if specified. + * @param message Usage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.Usage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Usage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Usage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a LicenseManager */ + class LicenseManager extends $protobuf.rpc.Service { + + /** + * Constructs a new LicenseManager 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 LicenseManager 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): LicenseManager; + + /** + * Calls ListConfigurations. + * @param request ListConfigurationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConfigurationsResponse + */ + public listConfigurations(request: google.cloud.licensemanager.v1.IListConfigurationsRequest, callback: google.cloud.licensemanager.v1.LicenseManager.ListConfigurationsCallback): void; + + /** + * Calls ListConfigurations. + * @param request ListConfigurationsRequest message or plain object + * @returns Promise + */ + public listConfigurations(request: google.cloud.licensemanager.v1.IListConfigurationsRequest): Promise; + + /** + * Calls GetConfiguration. + * @param request GetConfigurationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Configuration + */ + public getConfiguration(request: google.cloud.licensemanager.v1.IGetConfigurationRequest, callback: google.cloud.licensemanager.v1.LicenseManager.GetConfigurationCallback): void; + + /** + * Calls GetConfiguration. + * @param request GetConfigurationRequest message or plain object + * @returns Promise + */ + public getConfiguration(request: google.cloud.licensemanager.v1.IGetConfigurationRequest): Promise; + + /** + * Calls CreateConfiguration. + * @param request CreateConfigurationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createConfiguration(request: google.cloud.licensemanager.v1.ICreateConfigurationRequest, callback: google.cloud.licensemanager.v1.LicenseManager.CreateConfigurationCallback): void; + + /** + * Calls CreateConfiguration. + * @param request CreateConfigurationRequest message or plain object + * @returns Promise + */ + public createConfiguration(request: google.cloud.licensemanager.v1.ICreateConfigurationRequest): Promise; + + /** + * Calls UpdateConfiguration. + * @param request UpdateConfigurationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateConfiguration(request: google.cloud.licensemanager.v1.IUpdateConfigurationRequest, callback: google.cloud.licensemanager.v1.LicenseManager.UpdateConfigurationCallback): void; + + /** + * Calls UpdateConfiguration. + * @param request UpdateConfigurationRequest message or plain object + * @returns Promise + */ + public updateConfiguration(request: google.cloud.licensemanager.v1.IUpdateConfigurationRequest): Promise; + + /** + * Calls DeleteConfiguration. + * @param request DeleteConfigurationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteConfiguration(request: google.cloud.licensemanager.v1.IDeleteConfigurationRequest, callback: google.cloud.licensemanager.v1.LicenseManager.DeleteConfigurationCallback): void; + + /** + * Calls DeleteConfiguration. + * @param request DeleteConfigurationRequest message or plain object + * @returns Promise + */ + public deleteConfiguration(request: google.cloud.licensemanager.v1.IDeleteConfigurationRequest): Promise; + + /** + * Calls ListInstances. + * @param request ListInstancesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInstancesResponse + */ + public listInstances(request: google.cloud.licensemanager.v1.IListInstancesRequest, callback: google.cloud.licensemanager.v1.LicenseManager.ListInstancesCallback): void; + + /** + * Calls ListInstances. + * @param request ListInstancesRequest message or plain object + * @returns Promise + */ + public listInstances(request: google.cloud.licensemanager.v1.IListInstancesRequest): Promise; + + /** + * Calls GetInstance. + * @param request GetInstanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Instance + */ + public getInstance(request: google.cloud.licensemanager.v1.IGetInstanceRequest, callback: google.cloud.licensemanager.v1.LicenseManager.GetInstanceCallback): void; + + /** + * Calls GetInstance. + * @param request GetInstanceRequest message or plain object + * @returns Promise + */ + public getInstance(request: google.cloud.licensemanager.v1.IGetInstanceRequest): Promise; + + /** + * Calls DeactivateConfiguration. + * @param request DeactivateConfigurationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deactivateConfiguration(request: google.cloud.licensemanager.v1.IDeactivateConfigurationRequest, callback: google.cloud.licensemanager.v1.LicenseManager.DeactivateConfigurationCallback): void; + + /** + * Calls DeactivateConfiguration. + * @param request DeactivateConfigurationRequest message or plain object + * @returns Promise + */ + public deactivateConfiguration(request: google.cloud.licensemanager.v1.IDeactivateConfigurationRequest): Promise; + + /** + * Calls ReactivateConfiguration. + * @param request ReactivateConfigurationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public reactivateConfiguration(request: google.cloud.licensemanager.v1.IReactivateConfigurationRequest, callback: google.cloud.licensemanager.v1.LicenseManager.ReactivateConfigurationCallback): void; + + /** + * Calls ReactivateConfiguration. + * @param request ReactivateConfigurationRequest message or plain object + * @returns Promise + */ + public reactivateConfiguration(request: google.cloud.licensemanager.v1.IReactivateConfigurationRequest): Promise; + + /** + * Calls QueryConfigurationLicenseUsage. + * @param request QueryConfigurationLicenseUsageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryConfigurationLicenseUsageResponse + */ + public queryConfigurationLicenseUsage(request: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest, callback: google.cloud.licensemanager.v1.LicenseManager.QueryConfigurationLicenseUsageCallback): void; + + /** + * Calls QueryConfigurationLicenseUsage. + * @param request QueryConfigurationLicenseUsageRequest message or plain object + * @returns Promise + */ + public queryConfigurationLicenseUsage(request: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest): Promise; + + /** + * Calls AggregateUsage. + * @param request AggregateUsageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AggregateUsageResponse + */ + public aggregateUsage(request: google.cloud.licensemanager.v1.IAggregateUsageRequest, callback: google.cloud.licensemanager.v1.LicenseManager.AggregateUsageCallback): void; + + /** + * Calls AggregateUsage. + * @param request AggregateUsageRequest message or plain object + * @returns Promise + */ + public aggregateUsage(request: google.cloud.licensemanager.v1.IAggregateUsageRequest): Promise; + + /** + * Calls ListProducts. + * @param request ListProductsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListProductsResponse + */ + public listProducts(request: google.cloud.licensemanager.v1.IListProductsRequest, callback: google.cloud.licensemanager.v1.LicenseManager.ListProductsCallback): void; + + /** + * Calls ListProducts. + * @param request ListProductsRequest message or plain object + * @returns Promise + */ + public listProducts(request: google.cloud.licensemanager.v1.IListProductsRequest): Promise; + + /** + * Calls GetProduct. + * @param request GetProductRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Product + */ + public getProduct(request: google.cloud.licensemanager.v1.IGetProductRequest, callback: google.cloud.licensemanager.v1.LicenseManager.GetProductCallback): void; + + /** + * Calls GetProduct. + * @param request GetProductRequest message or plain object + * @returns Promise + */ + public getProduct(request: google.cloud.licensemanager.v1.IGetProductRequest): Promise; + } + + namespace LicenseManager { + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|listConfigurations}. + * @param error Error, if any + * @param [response] ListConfigurationsResponse + */ + type ListConfigurationsCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.ListConfigurationsResponse) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|getConfiguration}. + * @param error Error, if any + * @param [response] Configuration + */ + type GetConfigurationCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.Configuration) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|createConfiguration}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateConfigurationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|updateConfiguration}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateConfigurationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|deleteConfiguration}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteConfigurationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|listInstances}. + * @param error Error, if any + * @param [response] ListInstancesResponse + */ + type ListInstancesCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.ListInstancesResponse) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|getInstance}. + * @param error Error, if any + * @param [response] Instance + */ + type GetInstanceCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.Instance) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|deactivateConfiguration}. + * @param error Error, if any + * @param [response] Operation + */ + type DeactivateConfigurationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|reactivateConfiguration}. + * @param error Error, if any + * @param [response] Operation + */ + type ReactivateConfigurationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|queryConfigurationLicenseUsage}. + * @param error Error, if any + * @param [response] QueryConfigurationLicenseUsageResponse + */ + type QueryConfigurationLicenseUsageCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|aggregateUsage}. + * @param error Error, if any + * @param [response] AggregateUsageResponse + */ + type AggregateUsageCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.AggregateUsageResponse) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|listProducts}. + * @param error Error, if any + * @param [response] ListProductsResponse + */ + type ListProductsCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.ListProductsResponse) => void; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|getProduct}. + * @param error Error, if any + * @param [response] Product + */ + type GetProductCallback = (error: (Error|null), response?: google.cloud.licensemanager.v1.Product) => void; + } + + /** Properties of a ListConfigurationsRequest. */ + interface IListConfigurationsRequest { + + /** ListConfigurationsRequest parent */ + parent?: (string|null); + + /** ListConfigurationsRequest pageSize */ + pageSize?: (number|null); + + /** ListConfigurationsRequest pageToken */ + pageToken?: (string|null); + + /** ListConfigurationsRequest filter */ + filter?: (string|null); + + /** ListConfigurationsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListConfigurationsRequest. */ + class ListConfigurationsRequest implements IListConfigurationsRequest { + + /** + * Constructs a new ListConfigurationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IListConfigurationsRequest); + + /** ListConfigurationsRequest parent. */ + public parent: string; + + /** ListConfigurationsRequest pageSize. */ + public pageSize: number; + + /** ListConfigurationsRequest pageToken. */ + public pageToken: string; + + /** ListConfigurationsRequest filter. */ + public filter: string; + + /** ListConfigurationsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListConfigurationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConfigurationsRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IListConfigurationsRequest): google.cloud.licensemanager.v1.ListConfigurationsRequest; + + /** + * Encodes the specified ListConfigurationsRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsRequest.verify|verify} messages. + * @param message ListConfigurationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IListConfigurationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConfigurationsRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsRequest.verify|verify} messages. + * @param message ListConfigurationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IListConfigurationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConfigurationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConfigurationsRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.ListConfigurationsRequest; + + /** + * Decodes a ListConfigurationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConfigurationsRequest + * @throws {Error} If the payload 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.licensemanager.v1.ListConfigurationsRequest; + + /** + * Verifies a ListConfigurationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConfigurationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConfigurationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.ListConfigurationsRequest; + + /** + * Creates a plain object from a ListConfigurationsRequest message. Also converts values to other types if specified. + * @param message ListConfigurationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.ListConfigurationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConfigurationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConfigurationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConfigurationsResponse. */ + interface IListConfigurationsResponse { + + /** ListConfigurationsResponse configurations */ + configurations?: (google.cloud.licensemanager.v1.IConfiguration[]|null); + + /** ListConfigurationsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListConfigurationsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListConfigurationsResponse. */ + class ListConfigurationsResponse implements IListConfigurationsResponse { + + /** + * Constructs a new ListConfigurationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IListConfigurationsResponse); + + /** ListConfigurationsResponse configurations. */ + public configurations: google.cloud.licensemanager.v1.IConfiguration[]; + + /** ListConfigurationsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListConfigurationsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListConfigurationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConfigurationsResponse instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IListConfigurationsResponse): google.cloud.licensemanager.v1.ListConfigurationsResponse; + + /** + * Encodes the specified ListConfigurationsResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsResponse.verify|verify} messages. + * @param message ListConfigurationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IListConfigurationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConfigurationsResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsResponse.verify|verify} messages. + * @param message ListConfigurationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IListConfigurationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConfigurationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConfigurationsResponse + * @throws {Error} If the payload is not 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.licensemanager.v1.ListConfigurationsResponse; + + /** + * Decodes a ListConfigurationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConfigurationsResponse + * @throws {Error} If the payload 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.licensemanager.v1.ListConfigurationsResponse; + + /** + * Verifies a ListConfigurationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConfigurationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConfigurationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.ListConfigurationsResponse; + + /** + * Creates a plain object from a ListConfigurationsResponse message. Also converts values to other types if specified. + * @param message ListConfigurationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.ListConfigurationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConfigurationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConfigurationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConfigurationRequest. */ + interface IGetConfigurationRequest { + + /** GetConfigurationRequest name */ + name?: (string|null); + } + + /** Represents a GetConfigurationRequest. */ + class GetConfigurationRequest implements IGetConfigurationRequest { + + /** + * Constructs a new GetConfigurationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IGetConfigurationRequest); + + /** GetConfigurationRequest name. */ + public name: string; + + /** + * Creates a new GetConfigurationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConfigurationRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IGetConfigurationRequest): google.cloud.licensemanager.v1.GetConfigurationRequest; + + /** + * Encodes the specified GetConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.GetConfigurationRequest.verify|verify} messages. + * @param message GetConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IGetConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.GetConfigurationRequest.verify|verify} messages. + * @param message GetConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IGetConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConfigurationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConfigurationRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.GetConfigurationRequest; + + /** + * Decodes a GetConfigurationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConfigurationRequest + * @throws {Error} If the payload 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.licensemanager.v1.GetConfigurationRequest; + + /** + * Verifies a GetConfigurationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConfigurationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.GetConfigurationRequest; + + /** + * Creates a plain object from a GetConfigurationRequest message. Also converts values to other types if specified. + * @param message GetConfigurationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.GetConfigurationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConfigurationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConfigurationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConfigurationRequest. */ + interface ICreateConfigurationRequest { + + /** CreateConfigurationRequest parent */ + parent?: (string|null); + + /** CreateConfigurationRequest configurationId */ + configurationId?: (string|null); + + /** CreateConfigurationRequest configuration */ + configuration?: (google.cloud.licensemanager.v1.IConfiguration|null); + + /** CreateConfigurationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateConfigurationRequest. */ + class CreateConfigurationRequest implements ICreateConfigurationRequest { + + /** + * Constructs a new CreateConfigurationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.ICreateConfigurationRequest); + + /** CreateConfigurationRequest parent. */ + public parent: string; + + /** CreateConfigurationRequest configurationId. */ + public configurationId: string; + + /** CreateConfigurationRequest configuration. */ + public configuration?: (google.cloud.licensemanager.v1.IConfiguration|null); + + /** CreateConfigurationRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateConfigurationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConfigurationRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.ICreateConfigurationRequest): google.cloud.licensemanager.v1.CreateConfigurationRequest; + + /** + * Encodes the specified CreateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.CreateConfigurationRequest.verify|verify} messages. + * @param message CreateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.ICreateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.CreateConfigurationRequest.verify|verify} messages. + * @param message CreateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.ICreateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConfigurationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConfigurationRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.CreateConfigurationRequest; + + /** + * Decodes a CreateConfigurationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConfigurationRequest + * @throws {Error} If the payload 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.licensemanager.v1.CreateConfigurationRequest; + + /** + * Verifies a CreateConfigurationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConfigurationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.CreateConfigurationRequest; + + /** + * Creates a plain object from a CreateConfigurationRequest message. Also converts values to other types if specified. + * @param message CreateConfigurationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.CreateConfigurationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConfigurationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConfigurationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConfigurationRequest. */ + interface IUpdateConfigurationRequest { + + /** UpdateConfigurationRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConfigurationRequest configuration */ + configuration?: (google.cloud.licensemanager.v1.IConfiguration|null); + + /** UpdateConfigurationRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateConfigurationRequest. */ + class UpdateConfigurationRequest implements IUpdateConfigurationRequest { + + /** + * Constructs a new UpdateConfigurationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IUpdateConfigurationRequest); + + /** UpdateConfigurationRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateConfigurationRequest configuration. */ + public configuration?: (google.cloud.licensemanager.v1.IConfiguration|null); + + /** UpdateConfigurationRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateConfigurationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConfigurationRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IUpdateConfigurationRequest): google.cloud.licensemanager.v1.UpdateConfigurationRequest; + + /** + * Encodes the specified UpdateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.UpdateConfigurationRequest.verify|verify} messages. + * @param message UpdateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IUpdateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.UpdateConfigurationRequest.verify|verify} messages. + * @param message UpdateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IUpdateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConfigurationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConfigurationRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.UpdateConfigurationRequest; + + /** + * Decodes an UpdateConfigurationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConfigurationRequest + * @throws {Error} If the payload 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.licensemanager.v1.UpdateConfigurationRequest; + + /** + * Verifies an UpdateConfigurationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConfigurationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.UpdateConfigurationRequest; + + /** + * Creates a plain object from an UpdateConfigurationRequest message. Also converts values to other types if specified. + * @param message UpdateConfigurationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.UpdateConfigurationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConfigurationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConfigurationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConfigurationRequest. */ + interface IDeleteConfigurationRequest { + + /** DeleteConfigurationRequest name */ + name?: (string|null); + + /** DeleteConfigurationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteConfigurationRequest. */ + class DeleteConfigurationRequest implements IDeleteConfigurationRequest { + + /** + * Constructs a new DeleteConfigurationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IDeleteConfigurationRequest); + + /** DeleteConfigurationRequest name. */ + public name: string; + + /** DeleteConfigurationRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteConfigurationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConfigurationRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IDeleteConfigurationRequest): google.cloud.licensemanager.v1.DeleteConfigurationRequest; + + /** + * Encodes the specified DeleteConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.DeleteConfigurationRequest.verify|verify} messages. + * @param message DeleteConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IDeleteConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.DeleteConfigurationRequest.verify|verify} messages. + * @param message DeleteConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IDeleteConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConfigurationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConfigurationRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.DeleteConfigurationRequest; + + /** + * Decodes a DeleteConfigurationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConfigurationRequest + * @throws {Error} If the payload 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.licensemanager.v1.DeleteConfigurationRequest; + + /** + * Verifies a DeleteConfigurationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConfigurationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.DeleteConfigurationRequest; + + /** + * Creates a plain object from a DeleteConfigurationRequest message. Also converts values to other types if specified. + * @param message DeleteConfigurationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.DeleteConfigurationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConfigurationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConfigurationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInstancesRequest. */ + interface IListInstancesRequest { + + /** ListInstancesRequest parent */ + parent?: (string|null); + + /** ListInstancesRequest pageSize */ + pageSize?: (number|null); + + /** ListInstancesRequest pageToken */ + pageToken?: (string|null); + + /** ListInstancesRequest filter */ + filter?: (string|null); + + /** ListInstancesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListInstancesRequest. */ + class ListInstancesRequest implements IListInstancesRequest { + + /** + * Constructs a new ListInstancesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IListInstancesRequest); + + /** ListInstancesRequest parent. */ + public parent: string; + + /** ListInstancesRequest pageSize. */ + public pageSize: number; + + /** ListInstancesRequest pageToken. */ + public pageToken: string; + + /** ListInstancesRequest filter. */ + public filter: string; + + /** ListInstancesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListInstancesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInstancesRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IListInstancesRequest): google.cloud.licensemanager.v1.ListInstancesRequest; + + /** + * Encodes the specified ListInstancesRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesRequest.verify|verify} messages. + * @param message ListInstancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IListInstancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInstancesRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesRequest.verify|verify} messages. + * @param message ListInstancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IListInstancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInstancesRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.ListInstancesRequest; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInstancesRequest + * @throws {Error} If the payload 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.licensemanager.v1.ListInstancesRequest; + + /** + * Verifies a ListInstancesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInstancesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInstancesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.ListInstancesRequest; + + /** + * Creates a plain object from a ListInstancesRequest message. Also converts values to other types if specified. + * @param message ListInstancesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.ListInstancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInstancesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInstancesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInstancesResponse. */ + interface IListInstancesResponse { + + /** ListInstancesResponse instances */ + instances?: (google.cloud.licensemanager.v1.IInstance[]|null); + + /** ListInstancesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListInstancesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListInstancesResponse. */ + class ListInstancesResponse implements IListInstancesResponse { + + /** + * Constructs a new ListInstancesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IListInstancesResponse); + + /** ListInstancesResponse instances. */ + public instances: google.cloud.licensemanager.v1.IInstance[]; + + /** ListInstancesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListInstancesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListInstancesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInstancesResponse instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IListInstancesResponse): google.cloud.licensemanager.v1.ListInstancesResponse; + + /** + * Encodes the specified ListInstancesResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesResponse.verify|verify} messages. + * @param message ListInstancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IListInstancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInstancesResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesResponse.verify|verify} messages. + * @param message ListInstancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IListInstancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInstancesResponse + * @throws {Error} If the payload is not 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.licensemanager.v1.ListInstancesResponse; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInstancesResponse + * @throws {Error} If the payload 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.licensemanager.v1.ListInstancesResponse; + + /** + * Verifies a ListInstancesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInstancesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInstancesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.ListInstancesResponse; + + /** + * Creates a plain object from a ListInstancesResponse message. Also converts values to other types if specified. + * @param message ListInstancesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.ListInstancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInstancesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInstancesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetInstanceRequest. */ + interface IGetInstanceRequest { + + /** GetInstanceRequest name */ + name?: (string|null); + } + + /** Represents a GetInstanceRequest. */ + class GetInstanceRequest implements IGetInstanceRequest { + + /** + * Constructs a new GetInstanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IGetInstanceRequest); + + /** GetInstanceRequest name. */ + public name: string; + + /** + * Creates a new GetInstanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInstanceRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IGetInstanceRequest): google.cloud.licensemanager.v1.GetInstanceRequest; + + /** + * Encodes the specified GetInstanceRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.GetInstanceRequest.verify|verify} messages. + * @param message GetInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IGetInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.GetInstanceRequest.verify|verify} messages. + * @param message GetInstanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IGetInstanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetInstanceRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.GetInstanceRequest; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetInstanceRequest + * @throws {Error} If the payload 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.licensemanager.v1.GetInstanceRequest; + + /** + * Verifies a GetInstanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetInstanceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.GetInstanceRequest; + + /** + * Creates a plain object from a GetInstanceRequest message. Also converts values to other types if specified. + * @param message GetInstanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.GetInstanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetInstanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetInstanceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryConfigurationLicenseUsageRequest. */ + interface IQueryConfigurationLicenseUsageRequest { + + /** QueryConfigurationLicenseUsageRequest name */ + name?: (string|null); + + /** QueryConfigurationLicenseUsageRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** QueryConfigurationLicenseUsageRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a QueryConfigurationLicenseUsageRequest. */ + class QueryConfigurationLicenseUsageRequest implements IQueryConfigurationLicenseUsageRequest { + + /** + * Constructs a new QueryConfigurationLicenseUsageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest); + + /** QueryConfigurationLicenseUsageRequest name. */ + public name: string; + + /** QueryConfigurationLicenseUsageRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** QueryConfigurationLicenseUsageRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new QueryConfigurationLicenseUsageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryConfigurationLicenseUsageRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest): google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; + + /** + * Encodes the specified QueryConfigurationLicenseUsageRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.verify|verify} messages. + * @param message QueryConfigurationLicenseUsageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryConfigurationLicenseUsageRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.verify|verify} messages. + * @param message QueryConfigurationLicenseUsageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryConfigurationLicenseUsageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryConfigurationLicenseUsageRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.QueryConfigurationLicenseUsageRequest; + + /** + * Decodes a QueryConfigurationLicenseUsageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryConfigurationLicenseUsageRequest + * @throws {Error} If the payload 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.licensemanager.v1.QueryConfigurationLicenseUsageRequest; + + /** + * Verifies a QueryConfigurationLicenseUsageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryConfigurationLicenseUsageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryConfigurationLicenseUsageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest; + + /** + * Creates a plain object from a QueryConfigurationLicenseUsageRequest message. Also converts values to other types if specified. + * @param message QueryConfigurationLicenseUsageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryConfigurationLicenseUsageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryConfigurationLicenseUsageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QueryConfigurationLicenseUsageResponse. */ + interface IQueryConfigurationLicenseUsageResponse { + + /** QueryConfigurationLicenseUsageResponse userCountUsage */ + userCountUsage?: (google.cloud.licensemanager.v1.IUserCountUsage|null); + } + + /** Represents a QueryConfigurationLicenseUsageResponse. */ + class QueryConfigurationLicenseUsageResponse implements IQueryConfigurationLicenseUsageResponse { + + /** + * Constructs a new QueryConfigurationLicenseUsageResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse); + + /** QueryConfigurationLicenseUsageResponse userCountUsage. */ + public userCountUsage?: (google.cloud.licensemanager.v1.IUserCountUsage|null); + + /** QueryConfigurationLicenseUsageResponse details. */ + public details?: "userCountUsage"; + + /** + * Creates a new QueryConfigurationLicenseUsageResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryConfigurationLicenseUsageResponse instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse): google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; + + /** + * Encodes the specified QueryConfigurationLicenseUsageResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.verify|verify} messages. + * @param message QueryConfigurationLicenseUsageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryConfigurationLicenseUsageResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.verify|verify} messages. + * @param message QueryConfigurationLicenseUsageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryConfigurationLicenseUsageResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryConfigurationLicenseUsageResponse + * @throws {Error} If the payload is not 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.licensemanager.v1.QueryConfigurationLicenseUsageResponse; + + /** + * Decodes a QueryConfigurationLicenseUsageResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryConfigurationLicenseUsageResponse + * @throws {Error} If the payload 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.licensemanager.v1.QueryConfigurationLicenseUsageResponse; + + /** + * Verifies a QueryConfigurationLicenseUsageResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryConfigurationLicenseUsageResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryConfigurationLicenseUsageResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse; + + /** + * Creates a plain object from a QueryConfigurationLicenseUsageResponse message. Also converts values to other types if specified. + * @param message QueryConfigurationLicenseUsageResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryConfigurationLicenseUsageResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryConfigurationLicenseUsageResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeactivateConfigurationRequest. */ + interface IDeactivateConfigurationRequest { + + /** DeactivateConfigurationRequest name */ + name?: (string|null); + + /** DeactivateConfigurationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeactivateConfigurationRequest. */ + class DeactivateConfigurationRequest implements IDeactivateConfigurationRequest { + + /** + * Constructs a new DeactivateConfigurationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IDeactivateConfigurationRequest); + + /** DeactivateConfigurationRequest name. */ + public name: string; + + /** DeactivateConfigurationRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeactivateConfigurationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeactivateConfigurationRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IDeactivateConfigurationRequest): google.cloud.licensemanager.v1.DeactivateConfigurationRequest; + + /** + * Encodes the specified DeactivateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.DeactivateConfigurationRequest.verify|verify} messages. + * @param message DeactivateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IDeactivateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeactivateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.DeactivateConfigurationRequest.verify|verify} messages. + * @param message DeactivateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IDeactivateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeactivateConfigurationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeactivateConfigurationRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.DeactivateConfigurationRequest; + + /** + * Decodes a DeactivateConfigurationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeactivateConfigurationRequest + * @throws {Error} If the payload 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.licensemanager.v1.DeactivateConfigurationRequest; + + /** + * Verifies a DeactivateConfigurationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeactivateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeactivateConfigurationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.DeactivateConfigurationRequest; + + /** + * Creates a plain object from a DeactivateConfigurationRequest message. Also converts values to other types if specified. + * @param message DeactivateConfigurationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.DeactivateConfigurationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeactivateConfigurationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeactivateConfigurationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReactivateConfigurationRequest. */ + interface IReactivateConfigurationRequest { + + /** ReactivateConfigurationRequest name */ + name?: (string|null); + + /** ReactivateConfigurationRequest requestId */ + requestId?: (string|null); + } + + /** Represents a ReactivateConfigurationRequest. */ + class ReactivateConfigurationRequest implements IReactivateConfigurationRequest { + + /** + * Constructs a new ReactivateConfigurationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IReactivateConfigurationRequest); + + /** ReactivateConfigurationRequest name. */ + public name: string; + + /** ReactivateConfigurationRequest requestId. */ + public requestId: string; + + /** + * Creates a new ReactivateConfigurationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReactivateConfigurationRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IReactivateConfigurationRequest): google.cloud.licensemanager.v1.ReactivateConfigurationRequest; + + /** + * Encodes the specified ReactivateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ReactivateConfigurationRequest.verify|verify} messages. + * @param message ReactivateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IReactivateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReactivateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ReactivateConfigurationRequest.verify|verify} messages. + * @param message ReactivateConfigurationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IReactivateConfigurationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReactivateConfigurationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReactivateConfigurationRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.ReactivateConfigurationRequest; + + /** + * Decodes a ReactivateConfigurationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReactivateConfigurationRequest + * @throws {Error} If the payload 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.licensemanager.v1.ReactivateConfigurationRequest; + + /** + * Verifies a ReactivateConfigurationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReactivateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReactivateConfigurationRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.ReactivateConfigurationRequest; + + /** + * Creates a plain object from a ReactivateConfigurationRequest message. Also converts values to other types if specified. + * @param message ReactivateConfigurationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.ReactivateConfigurationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReactivateConfigurationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReactivateConfigurationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AggregateUsageRequest. */ + interface IAggregateUsageRequest { + + /** AggregateUsageRequest name */ + name?: (string|null); + + /** AggregateUsageRequest pageSize */ + pageSize?: (number|null); + + /** AggregateUsageRequest pageToken */ + pageToken?: (string|null); + + /** AggregateUsageRequest filter */ + filter?: (string|null); + + /** AggregateUsageRequest orderBy */ + orderBy?: (string|null); + + /** AggregateUsageRequest startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** AggregateUsageRequest endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an AggregateUsageRequest. */ + class AggregateUsageRequest implements IAggregateUsageRequest { + + /** + * Constructs a new AggregateUsageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IAggregateUsageRequest); + + /** AggregateUsageRequest name. */ + public name: string; + + /** AggregateUsageRequest pageSize. */ + public pageSize: number; + + /** AggregateUsageRequest pageToken. */ + public pageToken: string; + + /** AggregateUsageRequest filter. */ + public filter: string; + + /** AggregateUsageRequest orderBy. */ + public orderBy: string; + + /** AggregateUsageRequest startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** AggregateUsageRequest endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new AggregateUsageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregateUsageRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IAggregateUsageRequest): google.cloud.licensemanager.v1.AggregateUsageRequest; + + /** + * Encodes the specified AggregateUsageRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageRequest.verify|verify} messages. + * @param message AggregateUsageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IAggregateUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AggregateUsageRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageRequest.verify|verify} messages. + * @param message AggregateUsageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IAggregateUsageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AggregateUsageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregateUsageRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.AggregateUsageRequest; + + /** + * Decodes an AggregateUsageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregateUsageRequest + * @throws {Error} If the payload 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.licensemanager.v1.AggregateUsageRequest; + + /** + * Verifies an AggregateUsageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AggregateUsageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregateUsageRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.AggregateUsageRequest; + + /** + * Creates a plain object from an AggregateUsageRequest message. Also converts values to other types if specified. + * @param message AggregateUsageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.AggregateUsageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregateUsageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregateUsageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AggregateUsageResponse. */ + interface IAggregateUsageResponse { + + /** AggregateUsageResponse usages */ + usages?: (google.cloud.licensemanager.v1.IUsage[]|null); + + /** AggregateUsageResponse nextPageToken */ + nextPageToken?: (string|null); + + /** AggregateUsageResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents an AggregateUsageResponse. */ + class AggregateUsageResponse implements IAggregateUsageResponse { + + /** + * Constructs a new AggregateUsageResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IAggregateUsageResponse); + + /** AggregateUsageResponse usages. */ + public usages: google.cloud.licensemanager.v1.IUsage[]; + + /** AggregateUsageResponse nextPageToken. */ + public nextPageToken: string; + + /** AggregateUsageResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new AggregateUsageResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AggregateUsageResponse instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IAggregateUsageResponse): google.cloud.licensemanager.v1.AggregateUsageResponse; + + /** + * Encodes the specified AggregateUsageResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageResponse.verify|verify} messages. + * @param message AggregateUsageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IAggregateUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AggregateUsageResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageResponse.verify|verify} messages. + * @param message AggregateUsageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IAggregateUsageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AggregateUsageResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AggregateUsageResponse + * @throws {Error} If the payload is not 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.licensemanager.v1.AggregateUsageResponse; + + /** + * Decodes an AggregateUsageResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AggregateUsageResponse + * @throws {Error} If the payload 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.licensemanager.v1.AggregateUsageResponse; + + /** + * Verifies an AggregateUsageResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AggregateUsageResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregateUsageResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.AggregateUsageResponse; + + /** + * Creates a plain object from an AggregateUsageResponse message. Also converts values to other types if specified. + * @param message AggregateUsageResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.AggregateUsageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregateUsageResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregateUsageResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListProductsRequest. */ + interface IListProductsRequest { + + /** ListProductsRequest parent */ + parent?: (string|null); + + /** ListProductsRequest pageSize */ + pageSize?: (number|null); + + /** ListProductsRequest pageToken */ + pageToken?: (string|null); + + /** ListProductsRequest filter */ + filter?: (string|null); + + /** ListProductsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListProductsRequest. */ + class ListProductsRequest implements IListProductsRequest { + + /** + * Constructs a new ListProductsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IListProductsRequest); + + /** ListProductsRequest parent. */ + public parent: string; + + /** ListProductsRequest pageSize. */ + public pageSize: number; + + /** ListProductsRequest pageToken. */ + public pageToken: string; + + /** ListProductsRequest filter. */ + public filter: string; + + /** ListProductsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListProductsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProductsRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IListProductsRequest): google.cloud.licensemanager.v1.ListProductsRequest; + + /** + * Encodes the specified ListProductsRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsRequest.verify|verify} messages. + * @param message ListProductsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IListProductsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProductsRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsRequest.verify|verify} messages. + * @param message ListProductsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IListProductsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProductsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProductsRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.ListProductsRequest; + + /** + * Decodes a ListProductsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProductsRequest + * @throws {Error} If the payload 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.licensemanager.v1.ListProductsRequest; + + /** + * Verifies a ListProductsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListProductsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProductsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.ListProductsRequest; + + /** + * Creates a plain object from a ListProductsRequest message. Also converts values to other types if specified. + * @param message ListProductsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.ListProductsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProductsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProductsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListProductsResponse. */ + interface IListProductsResponse { + + /** ListProductsResponse products */ + products?: (google.cloud.licensemanager.v1.IProduct[]|null); + + /** ListProductsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListProductsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListProductsResponse. */ + class ListProductsResponse implements IListProductsResponse { + + /** + * Constructs a new ListProductsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IListProductsResponse); + + /** ListProductsResponse products. */ + public products: google.cloud.licensemanager.v1.IProduct[]; + + /** ListProductsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListProductsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListProductsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProductsResponse instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IListProductsResponse): google.cloud.licensemanager.v1.ListProductsResponse; + + /** + * Encodes the specified ListProductsResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsResponse.verify|verify} messages. + * @param message ListProductsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IListProductsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProductsResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsResponse.verify|verify} messages. + * @param message ListProductsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IListProductsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProductsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProductsResponse + * @throws {Error} If the payload is not 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.licensemanager.v1.ListProductsResponse; + + /** + * Decodes a ListProductsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProductsResponse + * @throws {Error} If the payload 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.licensemanager.v1.ListProductsResponse; + + /** + * Verifies a ListProductsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListProductsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProductsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.ListProductsResponse; + + /** + * Creates a plain object from a ListProductsResponse message. Also converts values to other types if specified. + * @param message ListProductsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.ListProductsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProductsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProductsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetProductRequest. */ + interface IGetProductRequest { + + /** GetProductRequest name */ + name?: (string|null); + } + + /** Represents a GetProductRequest. */ + class GetProductRequest implements IGetProductRequest { + + /** + * Constructs a new GetProductRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IGetProductRequest); + + /** GetProductRequest name. */ + public name: string; + + /** + * Creates a new GetProductRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProductRequest instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IGetProductRequest): google.cloud.licensemanager.v1.GetProductRequest; + + /** + * Encodes the specified GetProductRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.GetProductRequest.verify|verify} messages. + * @param message GetProductRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IGetProductRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProductRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.GetProductRequest.verify|verify} messages. + * @param message GetProductRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IGetProductRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProductRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetProductRequest + * @throws {Error} If the payload is not 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.licensemanager.v1.GetProductRequest; + + /** + * Decodes a GetProductRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetProductRequest + * @throws {Error} If the payload 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.licensemanager.v1.GetProductRequest; + + /** + * Verifies a GetProductRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetProductRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProductRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.GetProductRequest; + + /** + * Creates a plain object from a GetProductRequest message. Also converts values to other types if specified. + * @param message GetProductRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.GetProductRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProductRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetProductRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.licensemanager.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.licensemanager.v1.IOperationMetadata): google.cloud.licensemanager.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.licensemanager.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.licensemanager.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.licensemanager.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.licensemanager.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.licensemanager.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.licensemanager.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.licensemanager.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|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[]; + + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|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); + + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|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; + } + + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|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); + + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** + * 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 + } + + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a FieldInfo. */ + interface IFieldInfo { + + /** FieldInfo format */ + format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + + /** FieldInfo referencedTypes */ + referencedTypes?: (google.api.ITypeReference[]|null); + } + + /** Represents a FieldInfo. */ + class FieldInfo implements IFieldInfo { + + /** + * Constructs a new FieldInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IFieldInfo); + + /** FieldInfo format. */ + public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + + /** FieldInfo referencedTypes. */ + public referencedTypes: google.api.ITypeReference[]; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldInfo instance + */ + public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @param message FieldInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldInfo + * @throws {Error} If the payload is not 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.FieldInfo; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldInfo + * @throws {Error} If the payload 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.FieldInfo; + + /** + * Verifies a FieldInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldInfo + */ + public static fromObject(object: { [k: string]: any }): google.api.FieldInfo; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @param message FieldInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldInfo { + + /** Format enum. */ + enum Format { + FORMAT_UNSPECIFIED = 0, + UUID4 = 1, + IPV4 = 2, + IPV6 = 3, + IPV4_OR_IPV6 = 4 + } + } + + /** Properties of a TypeReference. */ + interface ITypeReference { + + /** TypeReference typeName */ + typeName?: (string|null); + } + + /** Represents a TypeReference. */ + class TypeReference implements ITypeReference { + + /** + * Constructs a new TypeReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ITypeReference); + + /** TypeReference typeName. */ + public typeName: string; + + /** + * Creates a new TypeReference instance using the specified properties. + * @param [properties] Properties to set + * @returns TypeReference instance + */ + public static create(properties?: google.api.ITypeReference): google.api.TypeReference; + + /** + * Encodes the specified TypeReference message. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @param message TypeReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ITypeReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TypeReference message, length delimited. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @param message TypeReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ITypeReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TypeReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TypeReference + * @throws {Error} If the payload is not 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.TypeReference; + + /** + * Decodes a TypeReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TypeReference + * @throws {Error} If the payload 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.TypeReference; + + /** + * Verifies a TypeReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TypeReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TypeReference + */ + public static fromObject(object: { [k: string]: any }): google.api.TypeReference; + + /** + * Creates a plain object from a TypeReference message. Also converts values to other types if specified. + * @param message TypeReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.TypeReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TypeReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TypeReference + * @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_LEGACY = 900, + 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 optionDependency */ + optionDependency?: (string[]|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 optionDependency. */ + public optionDependency: string[]; + + /** 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); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|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[]; + + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * 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); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|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[]; + + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * 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 featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|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); + + /** FieldOptions .google.api.fieldInfo */ + ".google.api.fieldInfo"?: (google.api.IFieldInfo|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 featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|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 a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @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 featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|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 featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|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); + + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + + /** + * 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 + } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } + } + + /** 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 overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (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 overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (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 + } + } + } + + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new Operations service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-licensemanager/protos/protos.js b/packages/google-cloud-licensemanager/protos/protos.js new file mode 100644 index 000000000000..164060d266ac --- /dev/null +++ b/packages/google-cloud-licensemanager/protos/protos.js @@ -0,0 +1,31698 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_licensemanager_protos || ($protobuf.roots._google_cloud_licensemanager_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.licensemanager = (function() { + + /** + * Namespace licensemanager. + * @memberof google.cloud + * @namespace + */ + var licensemanager = {}; + + licensemanager.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.licensemanager + * @namespace + */ + var v1 = {}; + + /** + * LicenseType enum. + * @name google.cloud.licensemanager.v1.LicenseType + * @enum {number} + * @property {number} LICENSE_TYPE_UNSPECIFIED=0 LICENSE_TYPE_UNSPECIFIED value + * @property {number} LICENSE_TYPE_PER_MONTH_PER_USER=1 LICENSE_TYPE_PER_MONTH_PER_USER value + * @property {number} LICENSE_TYPE_BRING_YOUR_OWN_LICENSE=2 LICENSE_TYPE_BRING_YOUR_OWN_LICENSE value + */ + v1.LicenseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LICENSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LICENSE_TYPE_PER_MONTH_PER_USER"] = 1; + values[valuesById[2] = "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE"] = 2; + return values; + })(); + + /** + * ActivationState enum. + * @name google.cloud.licensemanager.v1.ActivationState + * @enum {number} + * @property {number} ACTIVATION_STATE_UNSPECIFIED=0 ACTIVATION_STATE_UNSPECIFIED value + * @property {number} ACTIVATION_STATE_KEY_REQUESTED=1 ACTIVATION_STATE_KEY_REQUESTED value + * @property {number} ACTIVATION_STATE_ACTIVATING=2 ACTIVATION_STATE_ACTIVATING value + * @property {number} ACTIVATION_STATE_ACTIVATED=3 ACTIVATION_STATE_ACTIVATED value + * @property {number} ACTIVATION_STATE_DEACTIVATING=4 ACTIVATION_STATE_DEACTIVATING value + * @property {number} ACTIVATION_STATE_DEACTIVATED=5 ACTIVATION_STATE_DEACTIVATED value + * @property {number} ACTIVATION_STATE_TERMINATED=6 ACTIVATION_STATE_TERMINATED value + */ + v1.ActivationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTIVATION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVATION_STATE_KEY_REQUESTED"] = 1; + values[valuesById[2] = "ACTIVATION_STATE_ACTIVATING"] = 2; + values[valuesById[3] = "ACTIVATION_STATE_ACTIVATED"] = 3; + values[valuesById[4] = "ACTIVATION_STATE_DEACTIVATING"] = 4; + values[valuesById[5] = "ACTIVATION_STATE_DEACTIVATED"] = 5; + values[valuesById[6] = "ACTIVATION_STATE_TERMINATED"] = 6; + return values; + })(); + + v1.Configuration = (function() { + + /** + * Properties of a Configuration. + * @memberof google.cloud.licensemanager.v1 + * @interface IConfiguration + * @property {string|null} [name] Configuration name + * @property {string|null} [displayName] Configuration displayName + * @property {string|null} [product] Configuration product + * @property {google.cloud.licensemanager.v1.LicenseType|null} [licenseType] Configuration licenseType + * @property {google.cloud.licensemanager.v1.IBillingInfo|null} [currentBillingInfo] Configuration currentBillingInfo + * @property {google.cloud.licensemanager.v1.IBillingInfo|null} [nextBillingInfo] Configuration nextBillingInfo + * @property {google.protobuf.ITimestamp|null} [createTime] Configuration createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Configuration updateTime + * @property {Object.|null} [labels] Configuration labels + * @property {google.cloud.licensemanager.v1.Configuration.State|null} [state] Configuration state + */ + + /** + * Constructs a new Configuration. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a Configuration. + * @implements IConfiguration + * @constructor + * @param {google.cloud.licensemanager.v1.IConfiguration=} [properties] Properties to set + */ + function Configuration(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Configuration name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.name = ""; + + /** + * Configuration displayName. + * @member {string} displayName + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.displayName = ""; + + /** + * Configuration product. + * @member {string} product + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.product = ""; + + /** + * Configuration licenseType. + * @member {google.cloud.licensemanager.v1.LicenseType} licenseType + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.licenseType = 0; + + /** + * Configuration currentBillingInfo. + * @member {google.cloud.licensemanager.v1.IBillingInfo|null|undefined} currentBillingInfo + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.currentBillingInfo = null; + + /** + * Configuration nextBillingInfo. + * @member {google.cloud.licensemanager.v1.IBillingInfo|null|undefined} nextBillingInfo + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.nextBillingInfo = null; + + /** + * Configuration createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.createTime = null; + + /** + * Configuration updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.updateTime = null; + + /** + * Configuration labels. + * @member {Object.} labels + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.labels = $util.emptyObject; + + /** + * Configuration state. + * @member {google.cloud.licensemanager.v1.Configuration.State} state + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + */ + Configuration.prototype.state = 0; + + /** + * Creates a new Configuration instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {google.cloud.licensemanager.v1.IConfiguration=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.Configuration} Configuration instance + */ + Configuration.create = function create(properties) { + return new Configuration(properties); + }; + + /** + * Encodes the specified Configuration message. Does not implicitly {@link google.cloud.licensemanager.v1.Configuration.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {google.cloud.licensemanager.v1.IConfiguration} message Configuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Configuration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.product != null && Object.hasOwnProperty.call(message, "product")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.product); + if (message.licenseType != null && Object.hasOwnProperty.call(message, "licenseType")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.licenseType); + if (message.currentBillingInfo != null && Object.hasOwnProperty.call(message, "currentBillingInfo")) + $root.google.cloud.licensemanager.v1.BillingInfo.encode(message.currentBillingInfo, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.nextBillingInfo != null && Object.hasOwnProperty.call(message, "nextBillingInfo")) + $root.google.cloud.licensemanager.v1.BillingInfo.encode(message.nextBillingInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + return writer; + }; + + /** + * Encodes the specified Configuration message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Configuration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {google.cloud.licensemanager.v1.IConfiguration} message Configuration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Configuration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Configuration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.Configuration} Configuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Configuration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.Configuration(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.product = reader.string(); + break; + } + case 7: { + message.licenseType = reader.int32(); + break; + } + case 8: { + message.currentBillingInfo = $root.google.cloud.licensemanager.v1.BillingInfo.decode(reader, reader.uint32()); + break; + } + case 9: { + message.nextBillingInfo = $root.google.cloud.licensemanager.v1.BillingInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 10: { + message.state = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Configuration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.Configuration} Configuration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Configuration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Configuration message. + * @function verify + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Configuration.verify = function verify(message) { + if (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.product != null && message.hasOwnProperty("product")) + if (!$util.isString(message.product)) + return "product: string expected"; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + switch (message.licenseType) { + default: + return "licenseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.currentBillingInfo != null && message.hasOwnProperty("currentBillingInfo")) { + var error = $root.google.cloud.licensemanager.v1.BillingInfo.verify(message.currentBillingInfo); + if (error) + return "currentBillingInfo." + error; + } + if (message.nextBillingInfo != null && message.hasOwnProperty("nextBillingInfo")) { + var error = $root.google.cloud.licensemanager.v1.BillingInfo.verify(message.nextBillingInfo); + if (error) + return "nextBillingInfo." + 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.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a Configuration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.Configuration} Configuration + */ + Configuration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.Configuration) + return object; + var message = new $root.google.cloud.licensemanager.v1.Configuration(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.product != null) + message.product = String(object.product); + switch (object.licenseType) { + default: + if (typeof object.licenseType === "number") { + message.licenseType = object.licenseType; + break; + } + break; + case "LICENSE_TYPE_UNSPECIFIED": + case 0: + message.licenseType = 0; + break; + case "LICENSE_TYPE_PER_MONTH_PER_USER": + case 1: + message.licenseType = 1; + break; + case "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE": + case 2: + message.licenseType = 2; + break; + } + if (object.currentBillingInfo != null) { + if (typeof object.currentBillingInfo !== "object") + throw TypeError(".google.cloud.licensemanager.v1.Configuration.currentBillingInfo: object expected"); + message.currentBillingInfo = $root.google.cloud.licensemanager.v1.BillingInfo.fromObject(object.currentBillingInfo); + } + if (object.nextBillingInfo != null) { + if (typeof object.nextBillingInfo !== "object") + throw TypeError(".google.cloud.licensemanager.v1.Configuration.nextBillingInfo: object expected"); + message.nextBillingInfo = $root.google.cloud.licensemanager.v1.BillingInfo.fromObject(object.nextBillingInfo); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.licensemanager.v1.Configuration.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.licensemanager.v1.Configuration.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.licensemanager.v1.Configuration.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_ACTIVE": + case 1: + message.state = 1; + break; + case "STATE_SUSPENDED": + case 2: + message.state = 2; + break; + case "STATE_DELETED": + case 3: + message.state = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a Configuration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {google.cloud.licensemanager.v1.Configuration} message Configuration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Configuration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.product = ""; + object.licenseType = options.enums === String ? "LICENSE_TYPE_UNSPECIFIED" : 0; + object.currentBillingInfo = null; + object.nextBillingInfo = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.product != null && message.hasOwnProperty("product")) + object.product = message.product; + if (message.licenseType != null && message.hasOwnProperty("licenseType")) + object.licenseType = options.enums === String ? $root.google.cloud.licensemanager.v1.LicenseType[message.licenseType] === undefined ? message.licenseType : $root.google.cloud.licensemanager.v1.LicenseType[message.licenseType] : message.licenseType; + if (message.currentBillingInfo != null && message.hasOwnProperty("currentBillingInfo")) + object.currentBillingInfo = $root.google.cloud.licensemanager.v1.BillingInfo.toObject(message.currentBillingInfo, options); + if (message.nextBillingInfo != null && message.hasOwnProperty("nextBillingInfo")) + object.nextBillingInfo = $root.google.cloud.licensemanager.v1.BillingInfo.toObject(message.nextBillingInfo, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.licensemanager.v1.Configuration.State[message.state] === undefined ? message.state : $root.google.cloud.licensemanager.v1.Configuration.State[message.state] : message.state; + return object; + }; + + /** + * Converts this Configuration to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.Configuration + * @instance + * @returns {Object.} JSON object + */ + Configuration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Configuration + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.Configuration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Configuration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.Configuration"; + }; + + /** + * State enum. + * @name google.cloud.licensemanager.v1.Configuration.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STATE_ACTIVE=1 STATE_ACTIVE value + * @property {number} STATE_SUSPENDED=2 STATE_SUSPENDED value + * @property {number} STATE_DELETED=3 STATE_DELETED value + */ + Configuration.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STATE_ACTIVE"] = 1; + values[valuesById[2] = "STATE_SUSPENDED"] = 2; + values[valuesById[3] = "STATE_DELETED"] = 3; + return values; + })(); + + return Configuration; + })(); + + v1.BillingInfo = (function() { + + /** + * Properties of a BillingInfo. + * @memberof google.cloud.licensemanager.v1 + * @interface IBillingInfo + * @property {google.cloud.licensemanager.v1.IUserCountBillingInfo|null} [userCountBilling] BillingInfo userCountBilling + * @property {google.protobuf.ITimestamp|null} [startTime] BillingInfo startTime + * @property {google.protobuf.ITimestamp|null} [endTime] BillingInfo endTime + */ + + /** + * Constructs a new BillingInfo. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a BillingInfo. + * @implements IBillingInfo + * @constructor + * @param {google.cloud.licensemanager.v1.IBillingInfo=} [properties] Properties to set + */ + function BillingInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BillingInfo userCountBilling. + * @member {google.cloud.licensemanager.v1.IUserCountBillingInfo|null|undefined} userCountBilling + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @instance + */ + BillingInfo.prototype.userCountBilling = null; + + /** + * BillingInfo startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @instance + */ + BillingInfo.prototype.startTime = null; + + /** + * BillingInfo endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @instance + */ + BillingInfo.prototype.endTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BillingInfo currentBillingInfo. + * @member {"userCountBilling"|undefined} currentBillingInfo + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @instance + */ + Object.defineProperty(BillingInfo.prototype, "currentBillingInfo", { + get: $util.oneOfGetter($oneOfFields = ["userCountBilling"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BillingInfo instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {google.cloud.licensemanager.v1.IBillingInfo=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.BillingInfo} BillingInfo instance + */ + BillingInfo.create = function create(properties) { + return new BillingInfo(properties); + }; + + /** + * Encodes the specified BillingInfo message. Does not implicitly {@link google.cloud.licensemanager.v1.BillingInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {google.cloud.licensemanager.v1.IBillingInfo} message BillingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BillingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userCountBilling != null && Object.hasOwnProperty.call(message, "userCountBilling")) + $root.google.cloud.licensemanager.v1.UserCountBillingInfo.encode(message.userCountBilling, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, 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 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BillingInfo message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.BillingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {google.cloud.licensemanager.v1.IBillingInfo} message BillingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BillingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BillingInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.BillingInfo} BillingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BillingInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.BillingInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userCountBilling = $root.google.cloud.licensemanager.v1.UserCountBillingInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BillingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.BillingInfo} BillingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BillingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BillingInfo message. + * @function verify + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BillingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userCountBilling != null && message.hasOwnProperty("userCountBilling")) { + properties.currentBillingInfo = 1; + { + var error = $root.google.cloud.licensemanager.v1.UserCountBillingInfo.verify(message.userCountBilling); + if (error) + return "userCountBilling." + error; + } + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a BillingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.BillingInfo} BillingInfo + */ + BillingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.BillingInfo) + return object; + var message = new $root.google.cloud.licensemanager.v1.BillingInfo(); + if (object.userCountBilling != null) { + if (typeof object.userCountBilling !== "object") + throw TypeError(".google.cloud.licensemanager.v1.BillingInfo.userCountBilling: object expected"); + message.userCountBilling = $root.google.cloud.licensemanager.v1.UserCountBillingInfo.fromObject(object.userCountBilling); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.licensemanager.v1.BillingInfo.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.licensemanager.v1.BillingInfo.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a BillingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {google.cloud.licensemanager.v1.BillingInfo} message BillingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BillingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + if (message.userCountBilling != null && message.hasOwnProperty("userCountBilling")) { + object.userCountBilling = $root.google.cloud.licensemanager.v1.UserCountBillingInfo.toObject(message.userCountBilling, options); + if (options.oneofs) + object.currentBillingInfo = "userCountBilling"; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this BillingInfo to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @instance + * @returns {Object.} JSON object + */ + BillingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BillingInfo + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.BillingInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BillingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.BillingInfo"; + }; + + return BillingInfo; + })(); + + v1.UserCountBillingInfo = (function() { + + /** + * Properties of a UserCountBillingInfo. + * @memberof google.cloud.licensemanager.v1 + * @interface IUserCountBillingInfo + * @property {number|null} [userCount] UserCountBillingInfo userCount + */ + + /** + * Constructs a new UserCountBillingInfo. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a UserCountBillingInfo. + * @implements IUserCountBillingInfo + * @constructor + * @param {google.cloud.licensemanager.v1.IUserCountBillingInfo=} [properties] Properties to set + */ + function UserCountBillingInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserCountBillingInfo userCount. + * @member {number} userCount + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @instance + */ + UserCountBillingInfo.prototype.userCount = 0; + + /** + * Creates a new UserCountBillingInfo instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {google.cloud.licensemanager.v1.IUserCountBillingInfo=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.UserCountBillingInfo} UserCountBillingInfo instance + */ + UserCountBillingInfo.create = function create(properties) { + return new UserCountBillingInfo(properties); + }; + + /** + * Encodes the specified UserCountBillingInfo message. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountBillingInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {google.cloud.licensemanager.v1.IUserCountBillingInfo} message UserCountBillingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserCountBillingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userCount != null && Object.hasOwnProperty.call(message, "userCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.userCount); + return writer; + }; + + /** + * Encodes the specified UserCountBillingInfo message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountBillingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {google.cloud.licensemanager.v1.IUserCountBillingInfo} message UserCountBillingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserCountBillingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserCountBillingInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.UserCountBillingInfo} UserCountBillingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserCountBillingInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.UserCountBillingInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserCountBillingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.UserCountBillingInfo} UserCountBillingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserCountBillingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserCountBillingInfo message. + * @function verify + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserCountBillingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userCount != null && message.hasOwnProperty("userCount")) + if (!$util.isInteger(message.userCount)) + return "userCount: integer expected"; + return null; + }; + + /** + * Creates a UserCountBillingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.UserCountBillingInfo} UserCountBillingInfo + */ + UserCountBillingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.UserCountBillingInfo) + return object; + var message = new $root.google.cloud.licensemanager.v1.UserCountBillingInfo(); + if (object.userCount != null) + message.userCount = object.userCount | 0; + return message; + }; + + /** + * Creates a plain object from a UserCountBillingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {google.cloud.licensemanager.v1.UserCountBillingInfo} message UserCountBillingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserCountBillingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userCount = 0; + if (message.userCount != null && message.hasOwnProperty("userCount")) + object.userCount = message.userCount; + return object; + }; + + /** + * Converts this UserCountBillingInfo to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @instance + * @returns {Object.} JSON object + */ + UserCountBillingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserCountBillingInfo + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.UserCountBillingInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserCountBillingInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.UserCountBillingInfo"; + }; + + return UserCountBillingInfo; + })(); + + v1.UserCountUsage = (function() { + + /** + * Properties of a UserCountUsage. + * @memberof google.cloud.licensemanager.v1 + * @interface IUserCountUsage + * @property {number|null} [uniqueUserCount] UserCountUsage uniqueUserCount + */ + + /** + * Constructs a new UserCountUsage. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a UserCountUsage. + * @implements IUserCountUsage + * @constructor + * @param {google.cloud.licensemanager.v1.IUserCountUsage=} [properties] Properties to set + */ + function UserCountUsage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserCountUsage uniqueUserCount. + * @member {number} uniqueUserCount + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @instance + */ + UserCountUsage.prototype.uniqueUserCount = 0; + + /** + * Creates a new UserCountUsage instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {google.cloud.licensemanager.v1.IUserCountUsage=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.UserCountUsage} UserCountUsage instance + */ + UserCountUsage.create = function create(properties) { + return new UserCountUsage(properties); + }; + + /** + * Encodes the specified UserCountUsage message. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountUsage.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {google.cloud.licensemanager.v1.IUserCountUsage} message UserCountUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserCountUsage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uniqueUserCount != null && Object.hasOwnProperty.call(message, "uniqueUserCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.uniqueUserCount); + return writer; + }; + + /** + * Encodes the specified UserCountUsage message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.UserCountUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {google.cloud.licensemanager.v1.IUserCountUsage} message UserCountUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserCountUsage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserCountUsage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.UserCountUsage} UserCountUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserCountUsage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.UserCountUsage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.uniqueUserCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserCountUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.UserCountUsage} UserCountUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserCountUsage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserCountUsage message. + * @function verify + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserCountUsage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uniqueUserCount != null && message.hasOwnProperty("uniqueUserCount")) + if (!$util.isInteger(message.uniqueUserCount)) + return "uniqueUserCount: integer expected"; + return null; + }; + + /** + * Creates a UserCountUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.UserCountUsage} UserCountUsage + */ + UserCountUsage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.UserCountUsage) + return object; + var message = new $root.google.cloud.licensemanager.v1.UserCountUsage(); + if (object.uniqueUserCount != null) + message.uniqueUserCount = object.uniqueUserCount | 0; + return message; + }; + + /** + * Creates a plain object from a UserCountUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {google.cloud.licensemanager.v1.UserCountUsage} message UserCountUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserCountUsage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.uniqueUserCount = 0; + if (message.uniqueUserCount != null && message.hasOwnProperty("uniqueUserCount")) + object.uniqueUserCount = message.uniqueUserCount; + return object; + }; + + /** + * Converts this UserCountUsage to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @instance + * @returns {Object.} JSON object + */ + UserCountUsage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserCountUsage + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.UserCountUsage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserCountUsage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.UserCountUsage"; + }; + + return UserCountUsage; + })(); + + v1.Product = (function() { + + /** + * Properties of a Product. + * @memberof google.cloud.licensemanager.v1 + * @interface IProduct + * @property {string|null} [name] Product name + * @property {string|null} [version] Product version + * @property {string|null} [productCompany] Product productCompany + * @property {google.cloud.licensemanager.v1.Product.State|null} [state] Product state + * @property {string|null} [sku] Product sku + * @property {string|null} [description] Product description + * @property {string|null} [displayName] Product displayName + */ + + /** + * Constructs a new Product. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a Product. + * @implements IProduct + * @constructor + * @param {google.cloud.licensemanager.v1.IProduct=} [properties] Properties to set + */ + function Product(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Product name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.Product + * @instance + */ + Product.prototype.name = ""; + + /** + * Product version. + * @member {string} version + * @memberof google.cloud.licensemanager.v1.Product + * @instance + */ + Product.prototype.version = ""; + + /** + * Product productCompany. + * @member {string} productCompany + * @memberof google.cloud.licensemanager.v1.Product + * @instance + */ + Product.prototype.productCompany = ""; + + /** + * Product state. + * @member {google.cloud.licensemanager.v1.Product.State} state + * @memberof google.cloud.licensemanager.v1.Product + * @instance + */ + Product.prototype.state = 0; + + /** + * Product sku. + * @member {string} sku + * @memberof google.cloud.licensemanager.v1.Product + * @instance + */ + Product.prototype.sku = ""; + + /** + * Product description. + * @member {string} description + * @memberof google.cloud.licensemanager.v1.Product + * @instance + */ + Product.prototype.description = ""; + + /** + * Product displayName. + * @member {string} displayName + * @memberof google.cloud.licensemanager.v1.Product + * @instance + */ + Product.prototype.displayName = ""; + + /** + * Creates a new Product instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {google.cloud.licensemanager.v1.IProduct=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.Product} Product instance + */ + Product.create = function create(properties) { + return new Product(properties); + }; + + /** + * Encodes the specified Product message. Does not implicitly {@link google.cloud.licensemanager.v1.Product.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {google.cloud.licensemanager.v1.IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.productCompany != null && Object.hasOwnProperty.call(message, "productCompany")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.productCompany); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.sku != null && Object.hasOwnProperty.call(message, "sku")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.sku); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified Product message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Product.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {google.cloud.licensemanager.v1.IProduct} message Product message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Product.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Product message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.Product(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + case 3: { + message.productCompany = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.sku = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Product message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.Product} Product + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Product.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Product message. + * @function verify + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Product.verify = function verify(message) { + if (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.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.productCompany != null && message.hasOwnProperty("productCompany")) + if (!$util.isString(message.productCompany)) + return "productCompany: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.sku != null && message.hasOwnProperty("sku")) + if (!$util.isString(message.sku)) + return "sku: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates a Product message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.Product} Product + */ + Product.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.Product) + return object; + var message = new $root.google.cloud.licensemanager.v1.Product(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.productCompany != null) + message.productCompany = String(object.productCompany); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_PROVISIONING": + case 1: + message.state = 1; + break; + case "STATE_RUNNING": + case 2: + message.state = 2; + break; + case "STATE_TERMINATING": + case 3: + message.state = 3; + break; + case "STATE_TERMINATED": + case 4: + message.state = 4; + break; + } + if (object.sku != null) + message.sku = String(object.sku); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from a Product message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {google.cloud.licensemanager.v1.Product} message Product + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Product.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.productCompany = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.sku = ""; + object.description = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.productCompany != null && message.hasOwnProperty("productCompany")) + object.productCompany = message.productCompany; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.licensemanager.v1.Product.State[message.state] === undefined ? message.state : $root.google.cloud.licensemanager.v1.Product.State[message.state] : message.state; + if (message.sku != null && message.hasOwnProperty("sku")) + object.sku = message.sku; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this Product to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.Product + * @instance + * @returns {Object.} JSON object + */ + Product.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Product + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.Product + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Product.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.Product"; + }; + + /** + * State enum. + * @name google.cloud.licensemanager.v1.Product.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} STATE_PROVISIONING=1 STATE_PROVISIONING value + * @property {number} STATE_RUNNING=2 STATE_RUNNING value + * @property {number} STATE_TERMINATING=3 STATE_TERMINATING value + * @property {number} STATE_TERMINATED=4 STATE_TERMINATED value + */ + Product.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STATE_PROVISIONING"] = 1; + values[valuesById[2] = "STATE_RUNNING"] = 2; + values[valuesById[3] = "STATE_TERMINATING"] = 3; + values[valuesById[4] = "STATE_TERMINATED"] = 4; + return values; + })(); + + return Product; + })(); + + v1.Instance = (function() { + + /** + * Properties of an Instance. + * @memberof google.cloud.licensemanager.v1 + * @interface IInstance + * @property {string|null} [name] Instance name + * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Instance updateTime + * @property {Object.|null} [labels] Instance labels + * @property {google.cloud.licensemanager.v1.Instance.State|null} [state] Instance state + * @property {string|null} [region] Instance region + * @property {Object.|null} [productActivation] Instance productActivation + * @property {string|null} [licenseVersionId] Instance licenseVersionId + * @property {string|null} [computeInstance] Instance computeInstance + */ + + /** + * Constructs a new Instance. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents an Instance. + * @implements IInstance + * @constructor + * @param {google.cloud.licensemanager.v1.IInstance=} [properties] Properties to set + */ + function Instance(properties) { + this.labels = {}; + this.productActivation = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Instance name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.name = ""; + + /** + * Instance createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.createTime = null; + + /** + * Instance updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.updateTime = null; + + /** + * Instance labels. + * @member {Object.} labels + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.labels = $util.emptyObject; + + /** + * Instance state. + * @member {google.cloud.licensemanager.v1.Instance.State} state + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.state = 0; + + /** + * Instance region. + * @member {string} region + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.region = ""; + + /** + * Instance productActivation. + * @member {Object.} productActivation + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.productActivation = $util.emptyObject; + + /** + * Instance licenseVersionId. + * @member {string} licenseVersionId + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.licenseVersionId = ""; + + /** + * Instance computeInstance. + * @member {string} computeInstance + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + */ + Instance.prototype.computeInstance = ""; + + /** + * Creates a new Instance instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {google.cloud.licensemanager.v1.IInstance=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.Instance} Instance instance + */ + Instance.create = function create(properties) { + return new Instance(properties); + }; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.cloud.licensemanager.v1.Instance.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {google.cloud.licensemanager.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.region != null && Object.hasOwnProperty.call(message, "region")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.region); + if (message.productActivation != null && Object.hasOwnProperty.call(message, "productActivation")) + for (var keys = Object.keys(message.productActivation), i = 0; i < keys.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.productActivation[keys[i]]).ldelim(); + if (message.licenseVersionId != null && Object.hasOwnProperty.call(message, "licenseVersionId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.licenseVersionId); + if (message.computeInstance != null && Object.hasOwnProperty.call(message, "computeInstance")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.computeInstance); + return writer; + }; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Instance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {google.cloud.licensemanager.v1.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.Instance(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.region = reader.string(); + break; + } + case 7: { + if (message.productActivation === $util.emptyObject) + message.productActivation = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.productActivation[key] = value; + break; + } + case 8: { + message.licenseVersionId = reader.string(); + break; + } + case 9: { + message.computeInstance = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Instance message. + * @function verify + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Instance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.region != null && message.hasOwnProperty("region")) + if (!$util.isString(message.region)) + return "region: string expected"; + if (message.productActivation != null && message.hasOwnProperty("productActivation")) { + if (!$util.isObject(message.productActivation)) + return "productActivation: object expected"; + var key = Object.keys(message.productActivation); + for (var i = 0; i < key.length; ++i) + switch (message.productActivation[key[i]]) { + default: + return "productActivation: enum value{k:string} expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.licenseVersionId != null && message.hasOwnProperty("licenseVersionId")) + if (!$util.isString(message.licenseVersionId)) + return "licenseVersionId: string expected"; + if (message.computeInstance != null && message.hasOwnProperty("computeInstance")) + if (!$util.isString(message.computeInstance)) + return "computeInstance: string expected"; + return null; + }; + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.Instance} Instance + */ + Instance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.Instance) + return object; + var message = new $root.google.cloud.licensemanager.v1.Instance(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.licensemanager.v1.Instance.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.licensemanager.v1.Instance.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.licensemanager.v1.Instance.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PROVISIONING": + case 1: + message.state = 1; + break; + case "STAGING": + case 2: + message.state = 2; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + case "STOPPING": + case 4: + message.state = 4; + break; + case "STOPPED": + case 5: + message.state = 5; + break; + case "TERMINATED": + case 6: + message.state = 6; + break; + case "REPAIRING": + case 7: + message.state = 7; + break; + } + if (object.region != null) + message.region = String(object.region); + if (object.productActivation) { + if (typeof object.productActivation !== "object") + throw TypeError(".google.cloud.licensemanager.v1.Instance.productActivation: object expected"); + message.productActivation = {}; + for (var keys = Object.keys(object.productActivation), i = 0; i < keys.length; ++i) + switch (object.productActivation[keys[i]]) { + default: + if (typeof object.productActivation[keys[i]] === "number") { + message.productActivation[keys[i]] = object.productActivation[keys[i]]; + break; + } + break; + case "ACTIVATION_STATE_UNSPECIFIED": + case 0: + message.productActivation[keys[i]] = 0; + break; + case "ACTIVATION_STATE_KEY_REQUESTED": + case 1: + message.productActivation[keys[i]] = 1; + break; + case "ACTIVATION_STATE_ACTIVATING": + case 2: + message.productActivation[keys[i]] = 2; + break; + case "ACTIVATION_STATE_ACTIVATED": + case 3: + message.productActivation[keys[i]] = 3; + break; + case "ACTIVATION_STATE_DEACTIVATING": + case 4: + message.productActivation[keys[i]] = 4; + break; + case "ACTIVATION_STATE_DEACTIVATED": + case 5: + message.productActivation[keys[i]] = 5; + break; + case "ACTIVATION_STATE_TERMINATED": + case 6: + message.productActivation[keys[i]] = 6; + break; + } + } + if (object.licenseVersionId != null) + message.licenseVersionId = String(object.licenseVersionId); + if (object.computeInstance != null) + message.computeInstance = String(object.computeInstance); + return message; + }; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {google.cloud.licensemanager.v1.Instance} message Instance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Instance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.labels = {}; + object.productActivation = {}; + } + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.region = ""; + object.licenseVersionId = ""; + object.computeInstance = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.licensemanager.v1.Instance.State[message.state] === undefined ? message.state : $root.google.cloud.licensemanager.v1.Instance.State[message.state] : message.state; + if (message.region != null && message.hasOwnProperty("region")) + object.region = message.region; + if (message.productActivation && (keys2 = Object.keys(message.productActivation)).length) { + object.productActivation = {}; + for (var j = 0; j < keys2.length; ++j) + object.productActivation[keys2[j]] = options.enums === String ? $root.google.cloud.licensemanager.v1.ActivationState[message.productActivation[keys2[j]]] === undefined ? message.productActivation[keys2[j]] : $root.google.cloud.licensemanager.v1.ActivationState[message.productActivation[keys2[j]]] : message.productActivation[keys2[j]]; + } + if (message.licenseVersionId != null && message.hasOwnProperty("licenseVersionId")) + object.licenseVersionId = message.licenseVersionId; + if (message.computeInstance != null && message.hasOwnProperty("computeInstance")) + object.computeInstance = message.computeInstance; + return object; + }; + + /** + * Converts this Instance to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.Instance + * @instance + * @returns {Object.} JSON object + */ + Instance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Instance + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.Instance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Instance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.Instance"; + }; + + /** + * State enum. + * @name google.cloud.licensemanager.v1.Instance.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PROVISIONING=1 PROVISIONING value + * @property {number} STAGING=2 STAGING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} STOPPING=4 STOPPING value + * @property {number} STOPPED=5 STOPPED value + * @property {number} TERMINATED=6 TERMINATED value + * @property {number} REPAIRING=7 REPAIRING value + */ + Instance.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONING"] = 1; + values[valuesById[2] = "STAGING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "STOPPING"] = 4; + values[valuesById[5] = "STOPPED"] = 5; + values[valuesById[6] = "TERMINATED"] = 6; + values[valuesById[7] = "REPAIRING"] = 7; + return values; + })(); + + return Instance; + })(); + + v1.Usage = (function() { + + /** + * Properties of a Usage. + * @memberof google.cloud.licensemanager.v1 + * @interface IUsage + * @property {string|null} [limaInstance] Usage limaInstance + * @property {number|null} [users] Usage users + */ + + /** + * Constructs a new Usage. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a Usage. + * @implements IUsage + * @constructor + * @param {google.cloud.licensemanager.v1.IUsage=} [properties] Properties to set + */ + function Usage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Usage limaInstance. + * @member {string} limaInstance + * @memberof google.cloud.licensemanager.v1.Usage + * @instance + */ + Usage.prototype.limaInstance = ""; + + /** + * Usage users. + * @member {number} users + * @memberof google.cloud.licensemanager.v1.Usage + * @instance + */ + Usage.prototype.users = 0; + + /** + * Creates a new Usage instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {google.cloud.licensemanager.v1.IUsage=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.Usage} Usage instance + */ + Usage.create = function create(properties) { + return new Usage(properties); + }; + + /** + * Encodes the specified Usage message. Does not implicitly {@link google.cloud.licensemanager.v1.Usage.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {google.cloud.licensemanager.v1.IUsage} message Usage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Usage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.limaInstance != null && Object.hasOwnProperty.call(message, "limaInstance")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.limaInstance); + if (message.users != null && Object.hasOwnProperty.call(message, "users")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.users); + return writer; + }; + + /** + * Encodes the specified Usage message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.Usage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {google.cloud.licensemanager.v1.IUsage} message Usage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Usage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Usage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.Usage} Usage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Usage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.Usage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.limaInstance = reader.string(); + break; + } + case 2: { + message.users = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Usage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.Usage} Usage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Usage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Usage message. + * @function verify + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Usage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.limaInstance != null && message.hasOwnProperty("limaInstance")) + if (!$util.isString(message.limaInstance)) + return "limaInstance: string expected"; + if (message.users != null && message.hasOwnProperty("users")) + if (!$util.isInteger(message.users)) + return "users: integer expected"; + return null; + }; + + /** + * Creates a Usage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.Usage} Usage + */ + Usage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.Usage) + return object; + var message = new $root.google.cloud.licensemanager.v1.Usage(); + if (object.limaInstance != null) + message.limaInstance = String(object.limaInstance); + if (object.users != null) + message.users = object.users | 0; + return message; + }; + + /** + * Creates a plain object from a Usage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {google.cloud.licensemanager.v1.Usage} message Usage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Usage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.limaInstance = ""; + object.users = 0; + } + if (message.limaInstance != null && message.hasOwnProperty("limaInstance")) + object.limaInstance = message.limaInstance; + if (message.users != null && message.hasOwnProperty("users")) + object.users = message.users; + return object; + }; + + /** + * Converts this Usage to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.Usage + * @instance + * @returns {Object.} JSON object + */ + Usage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Usage + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.Usage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Usage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.Usage"; + }; + + return Usage; + })(); + + v1.LicenseManager = (function() { + + /** + * Constructs a new LicenseManager service. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a LicenseManager + * @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 LicenseManager(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (LicenseManager.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LicenseManager; + + /** + * Creates new LicenseManager service using the specified rpc implementation. + * @function create + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @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 {LicenseManager} RPC service. Useful where requests and/or responses are streamed. + */ + LicenseManager.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|listConfigurations}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef ListConfigurationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.ListConfigurationsResponse} [response] ListConfigurationsResponse + */ + + /** + * Calls ListConfigurations. + * @function listConfigurations + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IListConfigurationsRequest} request ListConfigurationsRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.ListConfigurationsCallback} callback Node-style callback called with the error, if any, and ListConfigurationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.listConfigurations = function listConfigurations(request, callback) { + return this.rpcCall(listConfigurations, $root.google.cloud.licensemanager.v1.ListConfigurationsRequest, $root.google.cloud.licensemanager.v1.ListConfigurationsResponse, request, callback); + }, "name", { value: "ListConfigurations" }); + + /** + * Calls ListConfigurations. + * @function listConfigurations + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IListConfigurationsRequest} request ListConfigurationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|getConfiguration}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef GetConfigurationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.Configuration} [response] Configuration + */ + + /** + * Calls GetConfiguration. + * @function getConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IGetConfigurationRequest} request GetConfigurationRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.GetConfigurationCallback} callback Node-style callback called with the error, if any, and Configuration + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.getConfiguration = function getConfiguration(request, callback) { + return this.rpcCall(getConfiguration, $root.google.cloud.licensemanager.v1.GetConfigurationRequest, $root.google.cloud.licensemanager.v1.Configuration, request, callback); + }, "name", { value: "GetConfiguration" }); + + /** + * Calls GetConfiguration. + * @function getConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IGetConfigurationRequest} request GetConfigurationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|createConfiguration}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef CreateConfigurationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateConfiguration. + * @function createConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.ICreateConfigurationRequest} request CreateConfigurationRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.CreateConfigurationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.createConfiguration = function createConfiguration(request, callback) { + return this.rpcCall(createConfiguration, $root.google.cloud.licensemanager.v1.CreateConfigurationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateConfiguration" }); + + /** + * Calls CreateConfiguration. + * @function createConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.ICreateConfigurationRequest} request CreateConfigurationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|updateConfiguration}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef UpdateConfigurationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateConfiguration. + * @function updateConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IUpdateConfigurationRequest} request UpdateConfigurationRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.UpdateConfigurationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.updateConfiguration = function updateConfiguration(request, callback) { + return this.rpcCall(updateConfiguration, $root.google.cloud.licensemanager.v1.UpdateConfigurationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateConfiguration" }); + + /** + * Calls UpdateConfiguration. + * @function updateConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IUpdateConfigurationRequest} request UpdateConfigurationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|deleteConfiguration}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef DeleteConfigurationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteConfiguration. + * @function deleteConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IDeleteConfigurationRequest} request DeleteConfigurationRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.DeleteConfigurationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.deleteConfiguration = function deleteConfiguration(request, callback) { + return this.rpcCall(deleteConfiguration, $root.google.cloud.licensemanager.v1.DeleteConfigurationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteConfiguration" }); + + /** + * Calls DeleteConfiguration. + * @function deleteConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IDeleteConfigurationRequest} request DeleteConfigurationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|listInstances}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef ListInstancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.ListInstancesResponse} [response] ListInstancesResponse + */ + + /** + * Calls ListInstances. + * @function listInstances + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IListInstancesRequest} request ListInstancesRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.ListInstancesCallback} callback Node-style callback called with the error, if any, and ListInstancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.listInstances = function listInstances(request, callback) { + return this.rpcCall(listInstances, $root.google.cloud.licensemanager.v1.ListInstancesRequest, $root.google.cloud.licensemanager.v1.ListInstancesResponse, request, callback); + }, "name", { value: "ListInstances" }); + + /** + * Calls ListInstances. + * @function listInstances + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IListInstancesRequest} request ListInstancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|getInstance}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef GetInstanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.Instance} [response] Instance + */ + + /** + * Calls GetInstance. + * @function getInstance + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IGetInstanceRequest} request GetInstanceRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.GetInstanceCallback} callback Node-style callback called with the error, if any, and Instance + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.getInstance = function getInstance(request, callback) { + return this.rpcCall(getInstance, $root.google.cloud.licensemanager.v1.GetInstanceRequest, $root.google.cloud.licensemanager.v1.Instance, request, callback); + }, "name", { value: "GetInstance" }); + + /** + * Calls GetInstance. + * @function getInstance + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IGetInstanceRequest} request GetInstanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|deactivateConfiguration}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef DeactivateConfigurationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeactivateConfiguration. + * @function deactivateConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IDeactivateConfigurationRequest} request DeactivateConfigurationRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.DeactivateConfigurationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.deactivateConfiguration = function deactivateConfiguration(request, callback) { + return this.rpcCall(deactivateConfiguration, $root.google.cloud.licensemanager.v1.DeactivateConfigurationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeactivateConfiguration" }); + + /** + * Calls DeactivateConfiguration. + * @function deactivateConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IDeactivateConfigurationRequest} request DeactivateConfigurationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|reactivateConfiguration}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef ReactivateConfigurationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ReactivateConfiguration. + * @function reactivateConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IReactivateConfigurationRequest} request ReactivateConfigurationRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.ReactivateConfigurationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.reactivateConfiguration = function reactivateConfiguration(request, callback) { + return this.rpcCall(reactivateConfiguration, $root.google.cloud.licensemanager.v1.ReactivateConfigurationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ReactivateConfiguration" }); + + /** + * Calls ReactivateConfiguration. + * @function reactivateConfiguration + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IReactivateConfigurationRequest} request ReactivateConfigurationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|queryConfigurationLicenseUsage}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef QueryConfigurationLicenseUsageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} [response] QueryConfigurationLicenseUsageResponse + */ + + /** + * Calls QueryConfigurationLicenseUsage. + * @function queryConfigurationLicenseUsage + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest} request QueryConfigurationLicenseUsageRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.QueryConfigurationLicenseUsageCallback} callback Node-style callback called with the error, if any, and QueryConfigurationLicenseUsageResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.queryConfigurationLicenseUsage = function queryConfigurationLicenseUsage(request, callback) { + return this.rpcCall(queryConfigurationLicenseUsage, $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest, $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse, request, callback); + }, "name", { value: "QueryConfigurationLicenseUsage" }); + + /** + * Calls QueryConfigurationLicenseUsage. + * @function queryConfigurationLicenseUsage + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest} request QueryConfigurationLicenseUsageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|aggregateUsage}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef AggregateUsageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.AggregateUsageResponse} [response] AggregateUsageResponse + */ + + /** + * Calls AggregateUsage. + * @function aggregateUsage + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IAggregateUsageRequest} request AggregateUsageRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.AggregateUsageCallback} callback Node-style callback called with the error, if any, and AggregateUsageResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.aggregateUsage = function aggregateUsage(request, callback) { + return this.rpcCall(aggregateUsage, $root.google.cloud.licensemanager.v1.AggregateUsageRequest, $root.google.cloud.licensemanager.v1.AggregateUsageResponse, request, callback); + }, "name", { value: "AggregateUsage" }); + + /** + * Calls AggregateUsage. + * @function aggregateUsage + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IAggregateUsageRequest} request AggregateUsageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|listProducts}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef ListProductsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.ListProductsResponse} [response] ListProductsResponse + */ + + /** + * Calls ListProducts. + * @function listProducts + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IListProductsRequest} request ListProductsRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.ListProductsCallback} callback Node-style callback called with the error, if any, and ListProductsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.listProducts = function listProducts(request, callback) { + return this.rpcCall(listProducts, $root.google.cloud.licensemanager.v1.ListProductsRequest, $root.google.cloud.licensemanager.v1.ListProductsResponse, request, callback); + }, "name", { value: "ListProducts" }); + + /** + * Calls ListProducts. + * @function listProducts + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IListProductsRequest} request ListProductsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.licensemanager.v1.LicenseManager|getProduct}. + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @typedef GetProductCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.licensemanager.v1.Product} [response] Product + */ + + /** + * Calls GetProduct. + * @function getProduct + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IGetProductRequest} request GetProductRequest message or plain object + * @param {google.cloud.licensemanager.v1.LicenseManager.GetProductCallback} callback Node-style callback called with the error, if any, and Product + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(LicenseManager.prototype.getProduct = function getProduct(request, callback) { + return this.rpcCall(getProduct, $root.google.cloud.licensemanager.v1.GetProductRequest, $root.google.cloud.licensemanager.v1.Product, request, callback); + }, "name", { value: "GetProduct" }); + + /** + * Calls GetProduct. + * @function getProduct + * @memberof google.cloud.licensemanager.v1.LicenseManager + * @instance + * @param {google.cloud.licensemanager.v1.IGetProductRequest} request GetProductRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return LicenseManager; + })(); + + v1.ListConfigurationsRequest = (function() { + + /** + * Properties of a ListConfigurationsRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IListConfigurationsRequest + * @property {string|null} [parent] ListConfigurationsRequest parent + * @property {number|null} [pageSize] ListConfigurationsRequest pageSize + * @property {string|null} [pageToken] ListConfigurationsRequest pageToken + * @property {string|null} [filter] ListConfigurationsRequest filter + * @property {string|null} [orderBy] ListConfigurationsRequest orderBy + */ + + /** + * Constructs a new ListConfigurationsRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a ListConfigurationsRequest. + * @implements IListConfigurationsRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IListConfigurationsRequest=} [properties] Properties to set + */ + function ListConfigurationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConfigurationsRequest parent. + * @member {string} parent + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @instance + */ + ListConfigurationsRequest.prototype.parent = ""; + + /** + * ListConfigurationsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @instance + */ + ListConfigurationsRequest.prototype.pageSize = 0; + + /** + * ListConfigurationsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @instance + */ + ListConfigurationsRequest.prototype.pageToken = ""; + + /** + * ListConfigurationsRequest filter. + * @member {string} filter + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @instance + */ + ListConfigurationsRequest.prototype.filter = ""; + + /** + * ListConfigurationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @instance + */ + ListConfigurationsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListConfigurationsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {google.cloud.licensemanager.v1.IListConfigurationsRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.ListConfigurationsRequest} ListConfigurationsRequest instance + */ + ListConfigurationsRequest.create = function create(properties) { + return new ListConfigurationsRequest(properties); + }; + + /** + * Encodes the specified ListConfigurationsRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {google.cloud.licensemanager.v1.IListConfigurationsRequest} message ListConfigurationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConfigurationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListConfigurationsRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {google.cloud.licensemanager.v1.IListConfigurationsRequest} message ListConfigurationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConfigurationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConfigurationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.ListConfigurationsRequest} ListConfigurationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConfigurationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.ListConfigurationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConfigurationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.ListConfigurationsRequest} ListConfigurationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConfigurationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConfigurationsRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConfigurationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListConfigurationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.ListConfigurationsRequest} ListConfigurationsRequest + */ + ListConfigurationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.ListConfigurationsRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.ListConfigurationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListConfigurationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {google.cloud.licensemanager.v1.ListConfigurationsRequest} message ListConfigurationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConfigurationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListConfigurationsRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConfigurationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConfigurationsRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.ListConfigurationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConfigurationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.ListConfigurationsRequest"; + }; + + return ListConfigurationsRequest; + })(); + + v1.ListConfigurationsResponse = (function() { + + /** + * Properties of a ListConfigurationsResponse. + * @memberof google.cloud.licensemanager.v1 + * @interface IListConfigurationsResponse + * @property {Array.|null} [configurations] ListConfigurationsResponse configurations + * @property {string|null} [nextPageToken] ListConfigurationsResponse nextPageToken + * @property {Array.|null} [unreachable] ListConfigurationsResponse unreachable + */ + + /** + * Constructs a new ListConfigurationsResponse. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a ListConfigurationsResponse. + * @implements IListConfigurationsResponse + * @constructor + * @param {google.cloud.licensemanager.v1.IListConfigurationsResponse=} [properties] Properties to set + */ + function ListConfigurationsResponse(properties) { + this.configurations = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConfigurationsResponse configurations. + * @member {Array.} configurations + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @instance + */ + ListConfigurationsResponse.prototype.configurations = $util.emptyArray; + + /** + * ListConfigurationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @instance + */ + ListConfigurationsResponse.prototype.nextPageToken = ""; + + /** + * ListConfigurationsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @instance + */ + ListConfigurationsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListConfigurationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {google.cloud.licensemanager.v1.IListConfigurationsResponse=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.ListConfigurationsResponse} ListConfigurationsResponse instance + */ + ListConfigurationsResponse.create = function create(properties) { + return new ListConfigurationsResponse(properties); + }; + + /** + * Encodes the specified ListConfigurationsResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {google.cloud.licensemanager.v1.IListConfigurationsResponse} message ListConfigurationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConfigurationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.configurations != null && message.configurations.length) + for (var i = 0; i < message.configurations.length; ++i) + $root.google.cloud.licensemanager.v1.Configuration.encode(message.configurations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListConfigurationsResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListConfigurationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {google.cloud.licensemanager.v1.IListConfigurationsResponse} message ListConfigurationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConfigurationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConfigurationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.ListConfigurationsResponse} ListConfigurationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConfigurationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.ListConfigurationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.configurations && message.configurations.length)) + message.configurations = []; + message.configurations.push($root.google.cloud.licensemanager.v1.Configuration.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConfigurationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.ListConfigurationsResponse} ListConfigurationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConfigurationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConfigurationsResponse message. + * @function verify + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConfigurationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.configurations != null && message.hasOwnProperty("configurations")) { + if (!Array.isArray(message.configurations)) + return "configurations: array expected"; + for (var i = 0; i < message.configurations.length; ++i) { + var error = $root.google.cloud.licensemanager.v1.Configuration.verify(message.configurations[i]); + if (error) + return "configurations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListConfigurationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.ListConfigurationsResponse} ListConfigurationsResponse + */ + ListConfigurationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.ListConfigurationsResponse) + return object; + var message = new $root.google.cloud.licensemanager.v1.ListConfigurationsResponse(); + if (object.configurations) { + if (!Array.isArray(object.configurations)) + throw TypeError(".google.cloud.licensemanager.v1.ListConfigurationsResponse.configurations: array expected"); + message.configurations = []; + for (var i = 0; i < object.configurations.length; ++i) { + if (typeof object.configurations[i] !== "object") + throw TypeError(".google.cloud.licensemanager.v1.ListConfigurationsResponse.configurations: object expected"); + message.configurations[i] = $root.google.cloud.licensemanager.v1.Configuration.fromObject(object.configurations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.licensemanager.v1.ListConfigurationsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListConfigurationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {google.cloud.licensemanager.v1.ListConfigurationsResponse} message ListConfigurationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConfigurationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.configurations = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.configurations && message.configurations.length) { + object.configurations = []; + for (var j = 0; j < message.configurations.length; ++j) + object.configurations[j] = $root.google.cloud.licensemanager.v1.Configuration.toObject(message.configurations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListConfigurationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConfigurationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConfigurationsResponse + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.ListConfigurationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConfigurationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.ListConfigurationsResponse"; + }; + + return ListConfigurationsResponse; + })(); + + v1.GetConfigurationRequest = (function() { + + /** + * Properties of a GetConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IGetConfigurationRequest + * @property {string|null} [name] GetConfigurationRequest name + */ + + /** + * Constructs a new GetConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a GetConfigurationRequest. + * @implements IGetConfigurationRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IGetConfigurationRequest=} [properties] Properties to set + */ + function GetConfigurationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConfigurationRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @instance + */ + GetConfigurationRequest.prototype.name = ""; + + /** + * Creates a new GetConfigurationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetConfigurationRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.GetConfigurationRequest} GetConfigurationRequest instance + */ + GetConfigurationRequest.create = function create(properties) { + return new GetConfigurationRequest(properties); + }; + + /** + * Encodes the specified GetConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.GetConfigurationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetConfigurationRequest} message GetConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConfigurationRequest.encode = function encode(message, writer) { + 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 GetConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.GetConfigurationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetConfigurationRequest} message GetConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConfigurationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.GetConfigurationRequest} GetConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConfigurationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.GetConfigurationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConfigurationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.GetConfigurationRequest} GetConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConfigurationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConfigurationRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConfigurationRequest.verify = function verify(message) { + if (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 GetConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.GetConfigurationRequest} GetConfigurationRequest + */ + GetConfigurationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.GetConfigurationRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.GetConfigurationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConfigurationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.GetConfigurationRequest} message GetConfigurationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConfigurationRequest.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 GetConfigurationRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @instance + * @returns {Object.} JSON object + */ + GetConfigurationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConfigurationRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.GetConfigurationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConfigurationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.GetConfigurationRequest"; + }; + + return GetConfigurationRequest; + })(); + + v1.CreateConfigurationRequest = (function() { + + /** + * Properties of a CreateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface ICreateConfigurationRequest + * @property {string|null} [parent] CreateConfigurationRequest parent + * @property {string|null} [configurationId] CreateConfigurationRequest configurationId + * @property {google.cloud.licensemanager.v1.IConfiguration|null} [configuration] CreateConfigurationRequest configuration + * @property {string|null} [requestId] CreateConfigurationRequest requestId + */ + + /** + * Constructs a new CreateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a CreateConfigurationRequest. + * @implements ICreateConfigurationRequest + * @constructor + * @param {google.cloud.licensemanager.v1.ICreateConfigurationRequest=} [properties] Properties to set + */ + function CreateConfigurationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConfigurationRequest parent. + * @member {string} parent + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @instance + */ + CreateConfigurationRequest.prototype.parent = ""; + + /** + * CreateConfigurationRequest configurationId. + * @member {string} configurationId + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @instance + */ + CreateConfigurationRequest.prototype.configurationId = ""; + + /** + * CreateConfigurationRequest configuration. + * @member {google.cloud.licensemanager.v1.IConfiguration|null|undefined} configuration + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @instance + */ + CreateConfigurationRequest.prototype.configuration = null; + + /** + * CreateConfigurationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @instance + */ + CreateConfigurationRequest.prototype.requestId = ""; + + /** + * Creates a new CreateConfigurationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.ICreateConfigurationRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.CreateConfigurationRequest} CreateConfigurationRequest instance + */ + CreateConfigurationRequest.create = function create(properties) { + return new CreateConfigurationRequest(properties); + }; + + /** + * Encodes the specified CreateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.CreateConfigurationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.ICreateConfigurationRequest} message CreateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConfigurationRequest.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.configurationId != null && Object.hasOwnProperty.call(message, "configurationId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.configurationId); + if (message.configuration != null && Object.hasOwnProperty.call(message, "configuration")) + $root.google.cloud.licensemanager.v1.Configuration.encode(message.configuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.CreateConfigurationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.ICreateConfigurationRequest} message CreateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConfigurationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.CreateConfigurationRequest} CreateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConfigurationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.CreateConfigurationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.configurationId = reader.string(); + break; + } + case 3: { + message.configuration = $root.google.cloud.licensemanager.v1.Configuration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConfigurationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.CreateConfigurationRequest} CreateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConfigurationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConfigurationRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConfigurationRequest.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.configurationId != null && message.hasOwnProperty("configurationId")) + if (!$util.isString(message.configurationId)) + return "configurationId: string expected"; + if (message.configuration != null && message.hasOwnProperty("configuration")) { + var error = $root.google.cloud.licensemanager.v1.Configuration.verify(message.configuration); + if (error) + return "configuration." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.CreateConfigurationRequest} CreateConfigurationRequest + */ + CreateConfigurationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.CreateConfigurationRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.CreateConfigurationRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.configurationId != null) + message.configurationId = String(object.configurationId); + if (object.configuration != null) { + if (typeof object.configuration !== "object") + throw TypeError(".google.cloud.licensemanager.v1.CreateConfigurationRequest.configuration: object expected"); + message.configuration = $root.google.cloud.licensemanager.v1.Configuration.fromObject(object.configuration); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateConfigurationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.CreateConfigurationRequest} message CreateConfigurationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConfigurationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.configurationId = ""; + object.configuration = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.configurationId != null && message.hasOwnProperty("configurationId")) + object.configurationId = message.configurationId; + if (message.configuration != null && message.hasOwnProperty("configuration")) + object.configuration = $root.google.cloud.licensemanager.v1.Configuration.toObject(message.configuration, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateConfigurationRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConfigurationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConfigurationRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.CreateConfigurationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConfigurationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.CreateConfigurationRequest"; + }; + + return CreateConfigurationRequest; + })(); + + v1.UpdateConfigurationRequest = (function() { + + /** + * Properties of an UpdateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IUpdateConfigurationRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConfigurationRequest updateMask + * @property {google.cloud.licensemanager.v1.IConfiguration|null} [configuration] UpdateConfigurationRequest configuration + * @property {string|null} [requestId] UpdateConfigurationRequest requestId + */ + + /** + * Constructs a new UpdateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents an UpdateConfigurationRequest. + * @implements IUpdateConfigurationRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IUpdateConfigurationRequest=} [properties] Properties to set + */ + function UpdateConfigurationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConfigurationRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @instance + */ + UpdateConfigurationRequest.prototype.updateMask = null; + + /** + * UpdateConfigurationRequest configuration. + * @member {google.cloud.licensemanager.v1.IConfiguration|null|undefined} configuration + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @instance + */ + UpdateConfigurationRequest.prototype.configuration = null; + + /** + * UpdateConfigurationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @instance + */ + UpdateConfigurationRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateConfigurationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IUpdateConfigurationRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.UpdateConfigurationRequest} UpdateConfigurationRequest instance + */ + UpdateConfigurationRequest.create = function create(properties) { + return new UpdateConfigurationRequest(properties); + }; + + /** + * Encodes the specified UpdateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.UpdateConfigurationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IUpdateConfigurationRequest} message UpdateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConfigurationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.configuration != null && Object.hasOwnProperty.call(message, "configuration")) + $root.google.cloud.licensemanager.v1.Configuration.encode(message.configuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.UpdateConfigurationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IUpdateConfigurationRequest} message UpdateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConfigurationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.UpdateConfigurationRequest} UpdateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConfigurationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.UpdateConfigurationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.configuration = $root.google.cloud.licensemanager.v1.Configuration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConfigurationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.UpdateConfigurationRequest} UpdateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConfigurationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConfigurationRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConfigurationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.configuration != null && message.hasOwnProperty("configuration")) { + var error = $root.google.cloud.licensemanager.v1.Configuration.verify(message.configuration); + if (error) + return "configuration." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.UpdateConfigurationRequest} UpdateConfigurationRequest + */ + UpdateConfigurationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.UpdateConfigurationRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.UpdateConfigurationRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.licensemanager.v1.UpdateConfigurationRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.configuration != null) { + if (typeof object.configuration !== "object") + throw TypeError(".google.cloud.licensemanager.v1.UpdateConfigurationRequest.configuration: object expected"); + message.configuration = $root.google.cloud.licensemanager.v1.Configuration.fromObject(object.configuration); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateConfigurationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.UpdateConfigurationRequest} message UpdateConfigurationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConfigurationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.configuration = null; + object.requestId = ""; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.configuration != null && message.hasOwnProperty("configuration")) + object.configuration = $root.google.cloud.licensemanager.v1.Configuration.toObject(message.configuration, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateConfigurationRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConfigurationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConfigurationRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.UpdateConfigurationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConfigurationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.UpdateConfigurationRequest"; + }; + + return UpdateConfigurationRequest; + })(); + + v1.DeleteConfigurationRequest = (function() { + + /** + * Properties of a DeleteConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IDeleteConfigurationRequest + * @property {string|null} [name] DeleteConfigurationRequest name + * @property {string|null} [requestId] DeleteConfigurationRequest requestId + */ + + /** + * Constructs a new DeleteConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a DeleteConfigurationRequest. + * @implements IDeleteConfigurationRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IDeleteConfigurationRequest=} [properties] Properties to set + */ + function DeleteConfigurationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConfigurationRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @instance + */ + DeleteConfigurationRequest.prototype.name = ""; + + /** + * DeleteConfigurationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @instance + */ + DeleteConfigurationRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteConfigurationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IDeleteConfigurationRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.DeleteConfigurationRequest} DeleteConfigurationRequest instance + */ + DeleteConfigurationRequest.create = function create(properties) { + return new DeleteConfigurationRequest(properties); + }; + + /** + * Encodes the specified DeleteConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.DeleteConfigurationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IDeleteConfigurationRequest} message DeleteConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConfigurationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.DeleteConfigurationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IDeleteConfigurationRequest} message DeleteConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConfigurationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.DeleteConfigurationRequest} DeleteConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConfigurationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.DeleteConfigurationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConfigurationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.DeleteConfigurationRequest} DeleteConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConfigurationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConfigurationRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConfigurationRequest.verify = function verify(message) { + if (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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.DeleteConfigurationRequest} DeleteConfigurationRequest + */ + DeleteConfigurationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.DeleteConfigurationRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.DeleteConfigurationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteConfigurationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.DeleteConfigurationRequest} message DeleteConfigurationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConfigurationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteConfigurationRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConfigurationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConfigurationRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.DeleteConfigurationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConfigurationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.DeleteConfigurationRequest"; + }; + + return DeleteConfigurationRequest; + })(); + + v1.ListInstancesRequest = (function() { + + /** + * Properties of a ListInstancesRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IListInstancesRequest + * @property {string|null} [parent] ListInstancesRequest parent + * @property {number|null} [pageSize] ListInstancesRequest pageSize + * @property {string|null} [pageToken] ListInstancesRequest pageToken + * @property {string|null} [filter] ListInstancesRequest filter + * @property {string|null} [orderBy] ListInstancesRequest orderBy + */ + + /** + * Constructs a new ListInstancesRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a ListInstancesRequest. + * @implements IListInstancesRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IListInstancesRequest=} [properties] Properties to set + */ + function ListInstancesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInstancesRequest parent. + * @member {string} parent + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @instance + */ + ListInstancesRequest.prototype.parent = ""; + + /** + * ListInstancesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @instance + */ + ListInstancesRequest.prototype.pageSize = 0; + + /** + * ListInstancesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @instance + */ + ListInstancesRequest.prototype.pageToken = ""; + + /** + * ListInstancesRequest filter. + * @member {string} filter + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @instance + */ + ListInstancesRequest.prototype.filter = ""; + + /** + * ListInstancesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @instance + */ + ListInstancesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListInstancesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {google.cloud.licensemanager.v1.IListInstancesRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.ListInstancesRequest} ListInstancesRequest instance + */ + ListInstancesRequest.create = function create(properties) { + return new ListInstancesRequest(properties); + }; + + /** + * Encodes the specified ListInstancesRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {google.cloud.licensemanager.v1.IListInstancesRequest} message ListInstancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListInstancesRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {google.cloud.licensemanager.v1.IListInstancesRequest} message ListInstancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.ListInstancesRequest} ListInstancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.ListInstancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInstancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.ListInstancesRequest} ListInstancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInstancesRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInstancesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListInstancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.ListInstancesRequest} ListInstancesRequest + */ + ListInstancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.ListInstancesRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.ListInstancesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListInstancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {google.cloud.licensemanager.v1.ListInstancesRequest} message ListInstancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInstancesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListInstancesRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInstancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInstancesRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.ListInstancesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInstancesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.ListInstancesRequest"; + }; + + return ListInstancesRequest; + })(); + + v1.ListInstancesResponse = (function() { + + /** + * Properties of a ListInstancesResponse. + * @memberof google.cloud.licensemanager.v1 + * @interface IListInstancesResponse + * @property {Array.|null} [instances] ListInstancesResponse instances + * @property {string|null} [nextPageToken] ListInstancesResponse nextPageToken + * @property {Array.|null} [unreachable] ListInstancesResponse unreachable + */ + + /** + * Constructs a new ListInstancesResponse. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a ListInstancesResponse. + * @implements IListInstancesResponse + * @constructor + * @param {google.cloud.licensemanager.v1.IListInstancesResponse=} [properties] Properties to set + */ + function ListInstancesResponse(properties) { + this.instances = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInstancesResponse instances. + * @member {Array.} instances + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @instance + */ + ListInstancesResponse.prototype.instances = $util.emptyArray; + + /** + * ListInstancesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @instance + */ + ListInstancesResponse.prototype.nextPageToken = ""; + + /** + * ListInstancesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @instance + */ + ListInstancesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListInstancesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {google.cloud.licensemanager.v1.IListInstancesResponse=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.ListInstancesResponse} ListInstancesResponse instance + */ + ListInstancesResponse.create = function create(properties) { + return new ListInstancesResponse(properties); + }; + + /** + * Encodes the specified ListInstancesResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {google.cloud.licensemanager.v1.IListInstancesResponse} message ListInstancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.instances != null && message.instances.length) + for (var i = 0; i < message.instances.length; ++i) + $root.google.cloud.licensemanager.v1.Instance.encode(message.instances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListInstancesResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListInstancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {google.cloud.licensemanager.v1.IListInstancesResponse} message ListInstancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInstancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.ListInstancesResponse} ListInstancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.ListInstancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.instances && message.instances.length)) + message.instances = []; + message.instances.push($root.google.cloud.licensemanager.v1.Instance.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListInstancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.ListInstancesResponse} ListInstancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInstancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInstancesResponse message. + * @function verify + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInstancesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.instances != null && message.hasOwnProperty("instances")) { + if (!Array.isArray(message.instances)) + return "instances: array expected"; + for (var i = 0; i < message.instances.length; ++i) { + var error = $root.google.cloud.licensemanager.v1.Instance.verify(message.instances[i]); + if (error) + return "instances." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListInstancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.ListInstancesResponse} ListInstancesResponse + */ + ListInstancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.ListInstancesResponse) + return object; + var message = new $root.google.cloud.licensemanager.v1.ListInstancesResponse(); + if (object.instances) { + if (!Array.isArray(object.instances)) + throw TypeError(".google.cloud.licensemanager.v1.ListInstancesResponse.instances: array expected"); + message.instances = []; + for (var i = 0; i < object.instances.length; ++i) { + if (typeof object.instances[i] !== "object") + throw TypeError(".google.cloud.licensemanager.v1.ListInstancesResponse.instances: object expected"); + message.instances[i] = $root.google.cloud.licensemanager.v1.Instance.fromObject(object.instances[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.licensemanager.v1.ListInstancesResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListInstancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {google.cloud.licensemanager.v1.ListInstancesResponse} message ListInstancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInstancesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.instances = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.instances && message.instances.length) { + object.instances = []; + for (var j = 0; j < message.instances.length; ++j) + object.instances[j] = $root.google.cloud.licensemanager.v1.Instance.toObject(message.instances[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListInstancesResponse to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInstancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInstancesResponse + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.ListInstancesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInstancesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.ListInstancesResponse"; + }; + + return ListInstancesResponse; + })(); + + v1.GetInstanceRequest = (function() { + + /** + * Properties of a GetInstanceRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IGetInstanceRequest + * @property {string|null} [name] GetInstanceRequest name + */ + + /** + * Constructs a new GetInstanceRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a GetInstanceRequest. + * @implements IGetInstanceRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IGetInstanceRequest=} [properties] Properties to set + */ + function GetInstanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetInstanceRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @instance + */ + GetInstanceRequest.prototype.name = ""; + + /** + * Creates a new GetInstanceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetInstanceRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.GetInstanceRequest} GetInstanceRequest instance + */ + GetInstanceRequest.create = function create(properties) { + return new GetInstanceRequest(properties); + }; + + /** + * Encodes the specified GetInstanceRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.GetInstanceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetInstanceRequest} message GetInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceRequest.encode = function encode(message, writer) { + 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 GetInstanceRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.GetInstanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetInstanceRequest} message GetInstanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInstanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.GetInstanceRequest} GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.GetInstanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetInstanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.GetInstanceRequest} GetInstanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInstanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetInstanceRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInstanceRequest.verify = function verify(message) { + if (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 GetInstanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.GetInstanceRequest} GetInstanceRequest + */ + GetInstanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.GetInstanceRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.GetInstanceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetInstanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {google.cloud.licensemanager.v1.GetInstanceRequest} message GetInstanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInstanceRequest.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 GetInstanceRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @instance + * @returns {Object.} JSON object + */ + GetInstanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetInstanceRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.GetInstanceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetInstanceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.GetInstanceRequest"; + }; + + return GetInstanceRequest; + })(); + + v1.QueryConfigurationLicenseUsageRequest = (function() { + + /** + * Properties of a QueryConfigurationLicenseUsageRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IQueryConfigurationLicenseUsageRequest + * @property {string|null} [name] QueryConfigurationLicenseUsageRequest name + * @property {google.protobuf.ITimestamp|null} [startTime] QueryConfigurationLicenseUsageRequest startTime + * @property {google.protobuf.ITimestamp|null} [endTime] QueryConfigurationLicenseUsageRequest endTime + */ + + /** + * Constructs a new QueryConfigurationLicenseUsageRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a QueryConfigurationLicenseUsageRequest. + * @implements IQueryConfigurationLicenseUsageRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest=} [properties] Properties to set + */ + function QueryConfigurationLicenseUsageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConfigurationLicenseUsageRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @instance + */ + QueryConfigurationLicenseUsageRequest.prototype.name = ""; + + /** + * QueryConfigurationLicenseUsageRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @instance + */ + QueryConfigurationLicenseUsageRequest.prototype.startTime = null; + + /** + * QueryConfigurationLicenseUsageRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @instance + */ + QueryConfigurationLicenseUsageRequest.prototype.endTime = null; + + /** + * Creates a new QueryConfigurationLicenseUsageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest} QueryConfigurationLicenseUsageRequest instance + */ + QueryConfigurationLicenseUsageRequest.create = function create(properties) { + return new QueryConfigurationLicenseUsageRequest(properties); + }; + + /** + * Encodes the specified QueryConfigurationLicenseUsageRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest} message QueryConfigurationLicenseUsageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConfigurationLicenseUsageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 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 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConfigurationLicenseUsageRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest} message QueryConfigurationLicenseUsageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConfigurationLicenseUsageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConfigurationLicenseUsageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest} QueryConfigurationLicenseUsageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConfigurationLicenseUsageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConfigurationLicenseUsageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest} QueryConfigurationLicenseUsageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConfigurationLicenseUsageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConfigurationLicenseUsageRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConfigurationLicenseUsageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates a QueryConfigurationLicenseUsageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest} QueryConfigurationLicenseUsageRequest + */ + QueryConfigurationLicenseUsageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest.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.licensemanager.v1.QueryConfigurationLicenseUsageRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a QueryConfigurationLicenseUsageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest} message QueryConfigurationLicenseUsageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConfigurationLicenseUsageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this QueryConfigurationLicenseUsageRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @instance + * @returns {Object.} JSON object + */ + QueryConfigurationLicenseUsageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryConfigurationLicenseUsageRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryConfigurationLicenseUsageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest"; + }; + + return QueryConfigurationLicenseUsageRequest; + })(); + + v1.QueryConfigurationLicenseUsageResponse = (function() { + + /** + * Properties of a QueryConfigurationLicenseUsageResponse. + * @memberof google.cloud.licensemanager.v1 + * @interface IQueryConfigurationLicenseUsageResponse + * @property {google.cloud.licensemanager.v1.IUserCountUsage|null} [userCountUsage] QueryConfigurationLicenseUsageResponse userCountUsage + */ + + /** + * Constructs a new QueryConfigurationLicenseUsageResponse. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a QueryConfigurationLicenseUsageResponse. + * @implements IQueryConfigurationLicenseUsageResponse + * @constructor + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse=} [properties] Properties to set + */ + function QueryConfigurationLicenseUsageResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryConfigurationLicenseUsageResponse userCountUsage. + * @member {google.cloud.licensemanager.v1.IUserCountUsage|null|undefined} userCountUsage + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @instance + */ + QueryConfigurationLicenseUsageResponse.prototype.userCountUsage = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QueryConfigurationLicenseUsageResponse details. + * @member {"userCountUsage"|undefined} details + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @instance + */ + Object.defineProperty(QueryConfigurationLicenseUsageResponse.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["userCountUsage"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QueryConfigurationLicenseUsageResponse instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} QueryConfigurationLicenseUsageResponse instance + */ + QueryConfigurationLicenseUsageResponse.create = function create(properties) { + return new QueryConfigurationLicenseUsageResponse(properties); + }; + + /** + * Encodes the specified QueryConfigurationLicenseUsageResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse} message QueryConfigurationLicenseUsageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConfigurationLicenseUsageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userCountUsage != null && Object.hasOwnProperty.call(message, "userCountUsage")) + $root.google.cloud.licensemanager.v1.UserCountUsage.encode(message.userCountUsage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryConfigurationLicenseUsageResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse} message QueryConfigurationLicenseUsageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryConfigurationLicenseUsageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryConfigurationLicenseUsageResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} QueryConfigurationLicenseUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConfigurationLicenseUsageResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.userCountUsage = $root.google.cloud.licensemanager.v1.UserCountUsage.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryConfigurationLicenseUsageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} QueryConfigurationLicenseUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryConfigurationLicenseUsageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryConfigurationLicenseUsageResponse message. + * @function verify + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryConfigurationLicenseUsageResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.userCountUsage != null && message.hasOwnProperty("userCountUsage")) { + properties.details = 1; + { + var error = $root.google.cloud.licensemanager.v1.UserCountUsage.verify(message.userCountUsage); + if (error) + return "userCountUsage." + error; + } + } + return null; + }; + + /** + * Creates a QueryConfigurationLicenseUsageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} QueryConfigurationLicenseUsageResponse + */ + QueryConfigurationLicenseUsageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse) + return object; + var message = new $root.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse(); + if (object.userCountUsage != null) { + if (typeof object.userCountUsage !== "object") + throw TypeError(".google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse.userCountUsage: object expected"); + message.userCountUsage = $root.google.cloud.licensemanager.v1.UserCountUsage.fromObject(object.userCountUsage); + } + return message; + }; + + /** + * Creates a plain object from a QueryConfigurationLicenseUsageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse} message QueryConfigurationLicenseUsageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryConfigurationLicenseUsageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.userCountUsage != null && message.hasOwnProperty("userCountUsage")) { + object.userCountUsage = $root.google.cloud.licensemanager.v1.UserCountUsage.toObject(message.userCountUsage, options); + if (options.oneofs) + object.details = "userCountUsage"; + } + return object; + }; + + /** + * Converts this QueryConfigurationLicenseUsageResponse to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @instance + * @returns {Object.} JSON object + */ + QueryConfigurationLicenseUsageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QueryConfigurationLicenseUsageResponse + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryConfigurationLicenseUsageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse"; + }; + + return QueryConfigurationLicenseUsageResponse; + })(); + + v1.DeactivateConfigurationRequest = (function() { + + /** + * Properties of a DeactivateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IDeactivateConfigurationRequest + * @property {string|null} [name] DeactivateConfigurationRequest name + * @property {string|null} [requestId] DeactivateConfigurationRequest requestId + */ + + /** + * Constructs a new DeactivateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a DeactivateConfigurationRequest. + * @implements IDeactivateConfigurationRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IDeactivateConfigurationRequest=} [properties] Properties to set + */ + function DeactivateConfigurationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeactivateConfigurationRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @instance + */ + DeactivateConfigurationRequest.prototype.name = ""; + + /** + * DeactivateConfigurationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @instance + */ + DeactivateConfigurationRequest.prototype.requestId = ""; + + /** + * Creates a new DeactivateConfigurationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IDeactivateConfigurationRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.DeactivateConfigurationRequest} DeactivateConfigurationRequest instance + */ + DeactivateConfigurationRequest.create = function create(properties) { + return new DeactivateConfigurationRequest(properties); + }; + + /** + * Encodes the specified DeactivateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.DeactivateConfigurationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IDeactivateConfigurationRequest} message DeactivateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateConfigurationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeactivateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.DeactivateConfigurationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IDeactivateConfigurationRequest} message DeactivateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeactivateConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeactivateConfigurationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.DeactivateConfigurationRequest} DeactivateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateConfigurationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.DeactivateConfigurationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeactivateConfigurationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.DeactivateConfigurationRequest} DeactivateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeactivateConfigurationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeactivateConfigurationRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeactivateConfigurationRequest.verify = function verify(message) { + if (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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeactivateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.DeactivateConfigurationRequest} DeactivateConfigurationRequest + */ + DeactivateConfigurationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.DeactivateConfigurationRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.DeactivateConfigurationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeactivateConfigurationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.DeactivateConfigurationRequest} message DeactivateConfigurationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeactivateConfigurationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeactivateConfigurationRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @instance + * @returns {Object.} JSON object + */ + DeactivateConfigurationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeactivateConfigurationRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.DeactivateConfigurationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeactivateConfigurationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.DeactivateConfigurationRequest"; + }; + + return DeactivateConfigurationRequest; + })(); + + v1.ReactivateConfigurationRequest = (function() { + + /** + * Properties of a ReactivateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IReactivateConfigurationRequest + * @property {string|null} [name] ReactivateConfigurationRequest name + * @property {string|null} [requestId] ReactivateConfigurationRequest requestId + */ + + /** + * Constructs a new ReactivateConfigurationRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a ReactivateConfigurationRequest. + * @implements IReactivateConfigurationRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IReactivateConfigurationRequest=} [properties] Properties to set + */ + function ReactivateConfigurationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReactivateConfigurationRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @instance + */ + ReactivateConfigurationRequest.prototype.name = ""; + + /** + * ReactivateConfigurationRequest requestId. + * @member {string} requestId + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @instance + */ + ReactivateConfigurationRequest.prototype.requestId = ""; + + /** + * Creates a new ReactivateConfigurationRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IReactivateConfigurationRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.ReactivateConfigurationRequest} ReactivateConfigurationRequest instance + */ + ReactivateConfigurationRequest.create = function create(properties) { + return new ReactivateConfigurationRequest(properties); + }; + + /** + * Encodes the specified ReactivateConfigurationRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ReactivateConfigurationRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IReactivateConfigurationRequest} message ReactivateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReactivateConfigurationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified ReactivateConfigurationRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ReactivateConfigurationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.IReactivateConfigurationRequest} message ReactivateConfigurationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReactivateConfigurationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReactivateConfigurationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.ReactivateConfigurationRequest} ReactivateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReactivateConfigurationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.ReactivateConfigurationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReactivateConfigurationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.ReactivateConfigurationRequest} ReactivateConfigurationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReactivateConfigurationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReactivateConfigurationRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReactivateConfigurationRequest.verify = function verify(message) { + if (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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a ReactivateConfigurationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.ReactivateConfigurationRequest} ReactivateConfigurationRequest + */ + ReactivateConfigurationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.ReactivateConfigurationRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.ReactivateConfigurationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a ReactivateConfigurationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {google.cloud.licensemanager.v1.ReactivateConfigurationRequest} message ReactivateConfigurationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReactivateConfigurationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this ReactivateConfigurationRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @instance + * @returns {Object.} JSON object + */ + ReactivateConfigurationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReactivateConfigurationRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.ReactivateConfigurationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReactivateConfigurationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.ReactivateConfigurationRequest"; + }; + + return ReactivateConfigurationRequest; + })(); + + v1.AggregateUsageRequest = (function() { + + /** + * Properties of an AggregateUsageRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IAggregateUsageRequest + * @property {string|null} [name] AggregateUsageRequest name + * @property {number|null} [pageSize] AggregateUsageRequest pageSize + * @property {string|null} [pageToken] AggregateUsageRequest pageToken + * @property {string|null} [filter] AggregateUsageRequest filter + * @property {string|null} [orderBy] AggregateUsageRequest orderBy + * @property {google.protobuf.ITimestamp|null} [startTime] AggregateUsageRequest startTime + * @property {google.protobuf.ITimestamp|null} [endTime] AggregateUsageRequest endTime + */ + + /** + * Constructs a new AggregateUsageRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents an AggregateUsageRequest. + * @implements IAggregateUsageRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IAggregateUsageRequest=} [properties] Properties to set + */ + function AggregateUsageRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AggregateUsageRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + */ + AggregateUsageRequest.prototype.name = ""; + + /** + * AggregateUsageRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + */ + AggregateUsageRequest.prototype.pageSize = 0; + + /** + * AggregateUsageRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + */ + AggregateUsageRequest.prototype.pageToken = ""; + + /** + * AggregateUsageRequest filter. + * @member {string} filter + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + */ + AggregateUsageRequest.prototype.filter = ""; + + /** + * AggregateUsageRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + */ + AggregateUsageRequest.prototype.orderBy = ""; + + /** + * AggregateUsageRequest startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + */ + AggregateUsageRequest.prototype.startTime = null; + + /** + * AggregateUsageRequest endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + */ + AggregateUsageRequest.prototype.endTime = null; + + /** + * Creates a new AggregateUsageRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.IAggregateUsageRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.AggregateUsageRequest} AggregateUsageRequest instance + */ + AggregateUsageRequest.create = function create(properties) { + return new AggregateUsageRequest(properties); + }; + + /** + * Encodes the specified AggregateUsageRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.IAggregateUsageRequest} message AggregateUsageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateUsageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AggregateUsageRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.IAggregateUsageRequest} message AggregateUsageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateUsageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregateUsageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.AggregateUsageRequest} AggregateUsageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateUsageRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.AggregateUsageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + case 6: { + message.orderBy = reader.string(); + break; + } + case 7: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AggregateUsageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.AggregateUsageRequest} AggregateUsageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateUsageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AggregateUsageRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregateUsageRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + 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.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an AggregateUsageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.AggregateUsageRequest} AggregateUsageRequest + */ + AggregateUsageRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.AggregateUsageRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.AggregateUsageRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.licensemanager.v1.AggregateUsageRequest.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.licensemanager.v1.AggregateUsageRequest.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an AggregateUsageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {google.cloud.licensemanager.v1.AggregateUsageRequest} message AggregateUsageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregateUsageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.startTime = null; + object.endTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + return object; + }; + + /** + * Converts this AggregateUsageRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @instance + * @returns {Object.} JSON object + */ + AggregateUsageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregateUsageRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.AggregateUsageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregateUsageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.AggregateUsageRequest"; + }; + + return AggregateUsageRequest; + })(); + + v1.AggregateUsageResponse = (function() { + + /** + * Properties of an AggregateUsageResponse. + * @memberof google.cloud.licensemanager.v1 + * @interface IAggregateUsageResponse + * @property {Array.|null} [usages] AggregateUsageResponse usages + * @property {string|null} [nextPageToken] AggregateUsageResponse nextPageToken + * @property {Array.|null} [unreachable] AggregateUsageResponse unreachable + */ + + /** + * Constructs a new AggregateUsageResponse. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents an AggregateUsageResponse. + * @implements IAggregateUsageResponse + * @constructor + * @param {google.cloud.licensemanager.v1.IAggregateUsageResponse=} [properties] Properties to set + */ + function AggregateUsageResponse(properties) { + this.usages = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AggregateUsageResponse usages. + * @member {Array.} usages + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @instance + */ + AggregateUsageResponse.prototype.usages = $util.emptyArray; + + /** + * AggregateUsageResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @instance + */ + AggregateUsageResponse.prototype.nextPageToken = ""; + + /** + * AggregateUsageResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @instance + */ + AggregateUsageResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new AggregateUsageResponse instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.IAggregateUsageResponse=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.AggregateUsageResponse} AggregateUsageResponse instance + */ + AggregateUsageResponse.create = function create(properties) { + return new AggregateUsageResponse(properties); + }; + + /** + * Encodes the specified AggregateUsageResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.IAggregateUsageResponse} message AggregateUsageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateUsageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.usages != null && message.usages.length) + for (var i = 0; i < message.usages.length; ++i) + $root.google.cloud.licensemanager.v1.Usage.encode(message.usages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified AggregateUsageResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.AggregateUsageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.IAggregateUsageResponse} message AggregateUsageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AggregateUsageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AggregateUsageResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.AggregateUsageResponse} AggregateUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateUsageResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.AggregateUsageResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.usages && message.usages.length)) + message.usages = []; + message.usages.push($root.google.cloud.licensemanager.v1.Usage.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AggregateUsageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.AggregateUsageResponse} AggregateUsageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AggregateUsageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AggregateUsageResponse message. + * @function verify + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AggregateUsageResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.usages != null && message.hasOwnProperty("usages")) { + if (!Array.isArray(message.usages)) + return "usages: array expected"; + for (var i = 0; i < message.usages.length; ++i) { + var error = $root.google.cloud.licensemanager.v1.Usage.verify(message.usages[i]); + if (error) + return "usages." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates an AggregateUsageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.AggregateUsageResponse} AggregateUsageResponse + */ + AggregateUsageResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.AggregateUsageResponse) + return object; + var message = new $root.google.cloud.licensemanager.v1.AggregateUsageResponse(); + if (object.usages) { + if (!Array.isArray(object.usages)) + throw TypeError(".google.cloud.licensemanager.v1.AggregateUsageResponse.usages: array expected"); + message.usages = []; + for (var i = 0; i < object.usages.length; ++i) { + if (typeof object.usages[i] !== "object") + throw TypeError(".google.cloud.licensemanager.v1.AggregateUsageResponse.usages: object expected"); + message.usages[i] = $root.google.cloud.licensemanager.v1.Usage.fromObject(object.usages[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.licensemanager.v1.AggregateUsageResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from an AggregateUsageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {google.cloud.licensemanager.v1.AggregateUsageResponse} message AggregateUsageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregateUsageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.usages = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.usages && message.usages.length) { + object.usages = []; + for (var j = 0; j < message.usages.length; ++j) + object.usages[j] = $root.google.cloud.licensemanager.v1.Usage.toObject(message.usages[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this AggregateUsageResponse to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @instance + * @returns {Object.} JSON object + */ + AggregateUsageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregateUsageResponse + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.AggregateUsageResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregateUsageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.AggregateUsageResponse"; + }; + + return AggregateUsageResponse; + })(); + + v1.ListProductsRequest = (function() { + + /** + * Properties of a ListProductsRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IListProductsRequest + * @property {string|null} [parent] ListProductsRequest parent + * @property {number|null} [pageSize] ListProductsRequest pageSize + * @property {string|null} [pageToken] ListProductsRequest pageToken + * @property {string|null} [filter] ListProductsRequest filter + * @property {string|null} [orderBy] ListProductsRequest orderBy + */ + + /** + * Constructs a new ListProductsRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a ListProductsRequest. + * @implements IListProductsRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IListProductsRequest=} [properties] Properties to set + */ + function ListProductsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListProductsRequest parent. + * @member {string} parent + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @instance + */ + ListProductsRequest.prototype.parent = ""; + + /** + * ListProductsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @instance + */ + ListProductsRequest.prototype.pageSize = 0; + + /** + * ListProductsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @instance + */ + ListProductsRequest.prototype.pageToken = ""; + + /** + * ListProductsRequest filter. + * @member {string} filter + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @instance + */ + ListProductsRequest.prototype.filter = ""; + + /** + * ListProductsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @instance + */ + ListProductsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListProductsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {google.cloud.licensemanager.v1.IListProductsRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.ListProductsRequest} ListProductsRequest instance + */ + ListProductsRequest.create = function create(properties) { + return new ListProductsRequest(properties); + }; + + /** + * Encodes the specified ListProductsRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {google.cloud.licensemanager.v1.IListProductsRequest} message ListProductsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProductsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListProductsRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {google.cloud.licensemanager.v1.IListProductsRequest} message ListProductsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProductsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListProductsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.ListProductsRequest} ListProductsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProductsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.ListProductsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListProductsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.ListProductsRequest} ListProductsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProductsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListProductsRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProductsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListProductsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.ListProductsRequest} ListProductsRequest + */ + ListProductsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.ListProductsRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.ListProductsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListProductsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {google.cloud.licensemanager.v1.ListProductsRequest} message ListProductsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProductsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListProductsRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @instance + * @returns {Object.} JSON object + */ + ListProductsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListProductsRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.ListProductsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProductsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.ListProductsRequest"; + }; + + return ListProductsRequest; + })(); + + v1.ListProductsResponse = (function() { + + /** + * Properties of a ListProductsResponse. + * @memberof google.cloud.licensemanager.v1 + * @interface IListProductsResponse + * @property {Array.|null} [products] ListProductsResponse products + * @property {string|null} [nextPageToken] ListProductsResponse nextPageToken + * @property {Array.|null} [unreachable] ListProductsResponse unreachable + */ + + /** + * Constructs a new ListProductsResponse. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a ListProductsResponse. + * @implements IListProductsResponse + * @constructor + * @param {google.cloud.licensemanager.v1.IListProductsResponse=} [properties] Properties to set + */ + function ListProductsResponse(properties) { + this.products = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListProductsResponse products. + * @member {Array.} products + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @instance + */ + ListProductsResponse.prototype.products = $util.emptyArray; + + /** + * ListProductsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @instance + */ + ListProductsResponse.prototype.nextPageToken = ""; + + /** + * ListProductsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @instance + */ + ListProductsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListProductsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {google.cloud.licensemanager.v1.IListProductsResponse=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.ListProductsResponse} ListProductsResponse instance + */ + ListProductsResponse.create = function create(properties) { + return new ListProductsResponse(properties); + }; + + /** + * Encodes the specified ListProductsResponse message. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {google.cloud.licensemanager.v1.IListProductsResponse} message ListProductsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProductsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.products != null && message.products.length) + for (var i = 0; i < message.products.length; ++i) + $root.google.cloud.licensemanager.v1.Product.encode(message.products[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListProductsResponse message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.ListProductsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {google.cloud.licensemanager.v1.IListProductsResponse} message ListProductsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProductsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListProductsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.ListProductsResponse} ListProductsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProductsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.ListProductsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.products && message.products.length)) + message.products = []; + message.products.push($root.google.cloud.licensemanager.v1.Product.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListProductsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.ListProductsResponse} ListProductsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProductsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListProductsResponse message. + * @function verify + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProductsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.products != null && message.hasOwnProperty("products")) { + if (!Array.isArray(message.products)) + return "products: array expected"; + for (var i = 0; i < message.products.length; ++i) { + var error = $root.google.cloud.licensemanager.v1.Product.verify(message.products[i]); + if (error) + return "products." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListProductsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.ListProductsResponse} ListProductsResponse + */ + ListProductsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.ListProductsResponse) + return object; + var message = new $root.google.cloud.licensemanager.v1.ListProductsResponse(); + if (object.products) { + if (!Array.isArray(object.products)) + throw TypeError(".google.cloud.licensemanager.v1.ListProductsResponse.products: array expected"); + message.products = []; + for (var i = 0; i < object.products.length; ++i) { + if (typeof object.products[i] !== "object") + throw TypeError(".google.cloud.licensemanager.v1.ListProductsResponse.products: object expected"); + message.products[i] = $root.google.cloud.licensemanager.v1.Product.fromObject(object.products[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.licensemanager.v1.ListProductsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListProductsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {google.cloud.licensemanager.v1.ListProductsResponse} message ListProductsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProductsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.products = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.products && message.products.length) { + object.products = []; + for (var j = 0; j < message.products.length; ++j) + object.products[j] = $root.google.cloud.licensemanager.v1.Product.toObject(message.products[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListProductsResponse to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @instance + * @returns {Object.} JSON object + */ + ListProductsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListProductsResponse + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.ListProductsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProductsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.ListProductsResponse"; + }; + + return ListProductsResponse; + })(); + + v1.GetProductRequest = (function() { + + /** + * Properties of a GetProductRequest. + * @memberof google.cloud.licensemanager.v1 + * @interface IGetProductRequest + * @property {string|null} [name] GetProductRequest name + */ + + /** + * Constructs a new GetProductRequest. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents a GetProductRequest. + * @implements IGetProductRequest + * @constructor + * @param {google.cloud.licensemanager.v1.IGetProductRequest=} [properties] Properties to set + */ + function GetProductRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetProductRequest name. + * @member {string} name + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @instance + */ + GetProductRequest.prototype.name = ""; + + /** + * Creates a new GetProductRequest instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetProductRequest=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.GetProductRequest} GetProductRequest instance + */ + GetProductRequest.create = function create(properties) { + return new GetProductRequest(properties); + }; + + /** + * Encodes the specified GetProductRequest message. Does not implicitly {@link google.cloud.licensemanager.v1.GetProductRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetProductRequest} message GetProductRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProductRequest.encode = function encode(message, writer) { + 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 GetProductRequest message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.GetProductRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {google.cloud.licensemanager.v1.IGetProductRequest} message GetProductRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProductRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProductRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.GetProductRequest} GetProductRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProductRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.GetProductRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetProductRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.GetProductRequest} GetProductRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProductRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProductRequest message. + * @function verify + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProductRequest.verify = function verify(message) { + if (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 GetProductRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.GetProductRequest} GetProductRequest + */ + GetProductRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.GetProductRequest) + return object; + var message = new $root.google.cloud.licensemanager.v1.GetProductRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetProductRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {google.cloud.licensemanager.v1.GetProductRequest} message GetProductRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProductRequest.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 GetProductRequest to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @instance + * @returns {Object.} JSON object + */ + GetProductRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetProductRequest + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.GetProductRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.GetProductRequest"; + }; + + return GetProductRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.licensemanager.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.licensemanager.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.licensemanager.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {google.cloud.licensemanager.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.licensemanager.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.licensemanager.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {google.cloud.licensemanager.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.licensemanager.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {google.cloud.licensemanager.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.licensemanager.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.licensemanager.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + 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.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.licensemanager.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.licensemanager.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.licensemanager.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.licensemanager.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.licensemanager.v1.OperationMetadata.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.licensemanager.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {google.cloud.licensemanager.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + 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.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.licensemanager.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.licensemanager.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + return v1; + })(); + + return licensemanager; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration + */ + + /** + * 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; + + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + + /** + * 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(); + } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + 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; + } + } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } + 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; + } + } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } + 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 = ""; + object.selectiveGapicGeneration = null; + } + 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures + */ + + /** + * 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; + + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = 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(); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.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; + } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + 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 (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } + 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; + object.experimentalFeatures = null; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, 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"; + }; + + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices + */ + + /** + * 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) { + this.renamedServices = {}; + if (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; + + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + + /** + * 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(); + 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(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + 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; + } + 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"; + } + 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); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } + 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.objects || options.defaults) + object.renamedServices = {}; + 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]]; + } + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + + /** + * 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; + })(); + + api.FieldInfo = (function() { + + /** + * Properties of a FieldInfo. + * @memberof google.api + * @interface IFieldInfo + * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + * @property {Array.|null} [referencedTypes] FieldInfo referencedTypes + */ + + /** + * Constructs a new FieldInfo. + * @memberof google.api + * @classdesc Represents a FieldInfo. + * @implements IFieldInfo + * @constructor + * @param {google.api.IFieldInfo=} [properties] Properties to set + */ + function FieldInfo(properties) { + this.referencedTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldInfo format. + * @member {google.api.FieldInfo.Format} format + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.format = 0; + + /** + * FieldInfo referencedTypes. + * @member {Array.} referencedTypes + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.referencedTypes = $util.emptyArray; + + /** + * Creates a new FieldInfo instance using the specified properties. + * @function create + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo=} [properties] Properties to set + * @returns {google.api.FieldInfo} FieldInfo instance + */ + FieldInfo.create = function create(properties) { + return new FieldInfo(properties); + }; + + /** + * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encode + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.referencedTypes != null && message.referencedTypes.length) + for (var i = 0; i < message.referencedTypes.length; ++i) + $root.google.api.TypeReference.encode(message.referencedTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {google.api.IFieldInfo} message FieldInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer. + * @function decode + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.FieldInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.format = reader.int32(); + break; + } + case 2: { + if (!(message.referencedTypes && message.referencedTypes.length)) + message.referencedTypes = []; + message.referencedTypes.push($root.google.api.TypeReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.FieldInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.FieldInfo} FieldInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldInfo message. + * @function verify + * @memberof google.api.FieldInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.referencedTypes != null && message.hasOwnProperty("referencedTypes")) { + if (!Array.isArray(message.referencedTypes)) + return "referencedTypes: array expected"; + for (var i = 0; i < message.referencedTypes.length; ++i) { + var error = $root.google.api.TypeReference.verify(message.referencedTypes[i]); + if (error) + return "referencedTypes." + error; + } + } + return null; + }; + + /** + * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.FieldInfo + * @static + * @param {Object.} object Plain object + * @returns {google.api.FieldInfo} FieldInfo + */ + FieldInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.FieldInfo) + return object; + var message = new $root.google.api.FieldInfo(); + switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; + case "FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "UUID4": + case 1: + message.format = 1; + break; + case "IPV4": + case 2: + message.format = 2; + break; + case "IPV6": + case 3: + message.format = 3; + break; + case "IPV4_OR_IPV6": + case 4: + message.format = 4; + break; + } + if (object.referencedTypes) { + if (!Array.isArray(object.referencedTypes)) + throw TypeError(".google.api.FieldInfo.referencedTypes: array expected"); + message.referencedTypes = []; + for (var i = 0; i < object.referencedTypes.length; ++i) { + if (typeof object.referencedTypes[i] !== "object") + throw TypeError(".google.api.FieldInfo.referencedTypes: object expected"); + message.referencedTypes[i] = $root.google.api.TypeReference.fromObject(object.referencedTypes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FieldInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.FieldInfo + * @static + * @param {google.api.FieldInfo} message FieldInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.referencedTypes = []; + if (options.defaults) + object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + if (message.referencedTypes && message.referencedTypes.length) { + object.referencedTypes = []; + for (var j = 0; j < message.referencedTypes.length; ++j) + object.referencedTypes[j] = $root.google.api.TypeReference.toObject(message.referencedTypes[j], options); + } + return object; + }; + + /** + * Converts this FieldInfo to JSON. + * @function toJSON + * @memberof google.api.FieldInfo + * @instance + * @returns {Object.} JSON object + */ + FieldInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldInfo + * @function getTypeUrl + * @memberof google.api.FieldInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.FieldInfo"; + }; + + /** + * Format enum. + * @name google.api.FieldInfo.Format + * @enum {number} + * @property {number} FORMAT_UNSPECIFIED=0 FORMAT_UNSPECIFIED value + * @property {number} UUID4=1 UUID4 value + * @property {number} IPV4=2 IPV4 value + * @property {number} IPV6=3 IPV6 value + * @property {number} IPV4_OR_IPV6=4 IPV4_OR_IPV6 value + */ + FieldInfo.Format = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "UUID4"] = 1; + values[valuesById[2] = "IPV4"] = 2; + values[valuesById[3] = "IPV6"] = 3; + values[valuesById[4] = "IPV4_OR_IPV6"] = 4; + return values; + })(); + + return FieldInfo; + })(); + + api.TypeReference = (function() { + + /** + * Properties of a TypeReference. + * @memberof google.api + * @interface ITypeReference + * @property {string|null} [typeName] TypeReference typeName + */ + + /** + * Constructs a new TypeReference. + * @memberof google.api + * @classdesc Represents a TypeReference. + * @implements ITypeReference + * @constructor + * @param {google.api.ITypeReference=} [properties] Properties to set + */ + function TypeReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TypeReference typeName. + * @member {string} typeName + * @memberof google.api.TypeReference + * @instance + */ + TypeReference.prototype.typeName = ""; + + /** + * Creates a new TypeReference instance using the specified properties. + * @function create + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference=} [properties] Properties to set + * @returns {google.api.TypeReference} TypeReference instance + */ + TypeReference.create = function create(properties) { + return new TypeReference(properties); + }; + + /** + * Encodes the specified TypeReference message. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @function encode + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference} message TypeReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.typeName); + return writer; + }; + + /** + * Encodes the specified TypeReference message, length delimited. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference} message TypeReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypeReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.TypeReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.TypeReference} TypeReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.TypeReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.typeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypeReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.TypeReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.TypeReference} TypeReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypeReference message. + * @function verify + * @memberof google.api.TypeReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TypeReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + return null; + }; + + /** + * Creates a TypeReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.TypeReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.TypeReference} TypeReference + */ + TypeReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.TypeReference) + return object; + var message = new $root.google.api.TypeReference(); + if (object.typeName != null) + message.typeName = String(object.typeName); + return message; + }; + + /** + * Creates a plain object from a TypeReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.TypeReference + * @static + * @param {google.api.TypeReference} message TypeReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TypeReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.typeName = ""; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + return object; + }; + + /** + * Converts this TypeReference to JSON. + * @function toJSON + * @memberof google.api.TypeReference + * @instance + * @returns {Object.} JSON object + */ + TypeReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TypeReference + * @function getTypeUrl + * @memberof google.api.TypeReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TypeReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.TypeReference"; + }; + + return TypeReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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[900] = "EDITION_LEGACY"] = 900; + 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} [optionDependency] FileDescriptorProto optionDependency + * @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.optionDependency = []; + 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 optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + 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.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] 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 900: + 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.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } + 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_LEGACY": + case 900: + message.edition = 900; + 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 = []; + object.optionDependency = []; + } + 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } + 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 + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility + */ + + /** + * 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; + + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + + /** + * 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 11: { + message.visibility = reader.int32(); + 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"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + 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; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + 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]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility + */ + + /** + * 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; + + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + + /** + * 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 6: { + message.visibility = reader.int32(); + 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"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + 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; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + 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]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport + * @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 + * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo + */ + + /** + * 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 featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = 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; + + /** + * FieldOptions .google.api.fieldInfo. + * @member {google.api.IFieldInfo|null|undefined} .google.api.fieldInfo + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldInfo"] = 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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + if (message[".google.api.fieldInfo"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldInfo")) + $root.google.api.FieldInfo.encode(message[".google.api.fieldInfo"], writer.uint32(/* id 291403980, wireType 2 =*/2331231842).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.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; + } + case 291403980: { + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.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.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + 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; + } + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) { + var error = $root.google.api.FieldInfo.verify(message[".google.api.fieldInfo"]); + if (error) + return ".google.api.fieldInfo." + 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.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + 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"]); + } + if (object[".google.api.fieldInfo"] != null) { + if (typeof object[".google.api.fieldInfo"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldInfo: object expected"); + message[".google.api.fieldInfo"] = $root.google.api.FieldInfo.fromObject(object[".google.api.fieldInfo"]); + } + 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.featureSupport = null; + object[".google.api.resourceReference"] = null; + object[".google.api.fieldInfo"] = 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.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, 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); + if (message[".google.api.fieldInfo"] != null && message.hasOwnProperty(".google.api.fieldInfo")) + object[".google.api.fieldInfo"] = $root.google.api.FieldInfo.toObject(message[".google.api.fieldInfo"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + 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_LEGACY": + case 900: + message.edition = 900; + 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; + })(); + + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport + * @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 featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + + /** + * 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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.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 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.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + 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 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.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + 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; + object.featureSupport = null; + } + 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.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, 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 EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility + */ + + /** + * 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; + + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = 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; + } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + 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; + } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; + 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; + })(); + + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 900: + 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 900: + 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_LEGACY": + case 900: + message.minimumEdition = 900; + 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_LEGACY": + case 900: + message.maximumEdition = 900; + 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} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures + */ + + /** + * 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 overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.fixedFeatures = 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.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $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 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); + if (error) + return "fixedFeatures." + 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_LEGACY": + case 900: + message.edition = 900; + 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.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); + } + 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.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; + } + 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations|listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations|waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i]); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) + return object; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-licensemanager/protos/protos.json b/packages/google-cloud-licensemanager/protos/protos.json new file mode 100644 index 000000000000..62aaae482820 --- /dev/null +++ b/packages/google-cloud-licensemanager/protos/protos.json @@ -0,0 +1,3473 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "licensemanager": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.LicenseManager.V1", + "go_package": "cloud.google.com/go/licensemanager/apiv1/licensemanagerpb;licensemanagerpb", + "java_multiple_files": true, + "java_outer_classname": "LicenseManagerProto", + "java_package": "com.google.cloud.licensemanager.v1", + "php_namespace": "Google\\Cloud\\LicenseManager\\V1", + "ruby_package": "Google::Cloud::LicenseManager::V1", + "(google.api.resource_definition).type": "compute.googleapis.com/ComputeInstance", + "(google.api.resource_definition).pattern": "projects/{project}/zones/{zone}/instances/{instance}" + }, + "nested": { + "LicenseType": { + "values": { + "LICENSE_TYPE_UNSPECIFIED": 0, + "LICENSE_TYPE_PER_MONTH_PER_USER": 1, + "LICENSE_TYPE_BRING_YOUR_OWN_LICENSE": 2 + } + }, + "ActivationState": { + "values": { + "ACTIVATION_STATE_UNSPECIFIED": 0, + "ACTIVATION_STATE_KEY_REQUESTED": 1, + "ACTIVATION_STATE_ACTIVATING": 2, + "ACTIVATION_STATE_ACTIVATED": 3, + "ACTIVATION_STATE_DEACTIVATING": 4, + "ACTIVATION_STATE_DEACTIVATED": 5, + "ACTIVATION_STATE_TERMINATED": 6 + } + }, + "Configuration": { + "options": { + "(google.api.resource).type": "licensemanager.googleapis.com/Configuration", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/configurations/{configuration}", + "(google.api.resource).plural": "configurations", + "(google.api.resource).singular": "configuration" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "product": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Product" + } + }, + "licenseType": { + "type": "LicenseType", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "currentBillingInfo": { + "type": "BillingInfo", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nextBillingInfo": { + "type": "BillingInfo", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STATE_ACTIVE": 1, + "STATE_SUSPENDED": 2, + "STATE_DELETED": 3 + } + } + } + }, + "BillingInfo": { + "oneofs": { + "currentBillingInfo": { + "oneof": [ + "userCountBilling" + ] + } + }, + "fields": { + "userCountBilling": { + "type": "UserCountBillingInfo", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "UserCountBillingInfo": { + "fields": { + "userCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UserCountUsage": { + "fields": { + "uniqueUserCount": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Product": { + "options": { + "(google.api.resource).type": "licensemanager.googleapis.com/Product", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/products/{product}", + "(google.api.resource).plural": "products", + "(google.api.resource).singular": "product" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "version": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "productCompany": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sku": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "STATE_PROVISIONING": 1, + "STATE_RUNNING": 2, + "STATE_TERMINATING": 3, + "STATE_TERMINATED": 4 + } + } + } + }, + "Instance": { + "options": { + "(google.api.resource).type": "licensemanager.googleapis.com/Instance", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/instances/{instance}", + "(google.api.resource).plural": "instances", + "(google.api.resource).singular": "instance" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "region": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "productActivation": { + "keyType": "string", + "type": "ActivationState", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "licenseVersionId": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "computeInstance": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "compute.googleapis.com/ComputeInstance" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PROVISIONING": 1, + "STAGING": 2, + "RUNNING": 3, + "STOPPING": 4, + "STOPPED": 5, + "TERMINATED": 6, + "REPAIRING": 7 + } + } + } + }, + "Usage": { + "fields": { + "limaInstance": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Instance" + } + }, + "users": { + "type": "int32", + "id": 2 + } + } + }, + "LicenseManager": { + "options": { + "(google.api.default_host)": "licensemanager.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListConfigurations": { + "requestType": "ListConfigurationsRequest", + "responseType": "ListConfigurationsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/configurations", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/configurations" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetConfiguration": { + "requestType": "GetConfigurationRequest", + "responseType": "Configuration", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/configurations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/configurations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateConfiguration": { + "requestType": "CreateConfigurationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/configurations", + "(google.api.http).body": "configuration", + "(google.api.method_signature)": "parent,configuration,configuration_id", + "(google.longrunning.operation_info).response_type": "Configuration", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/configurations", + "body": "configuration" + } + }, + { + "(google.api.method_signature)": "parent,configuration,configuration_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Configuration", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateConfiguration": { + "requestType": "UpdateConfigurationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{configuration.name=projects/*/locations/*/configurations/*}", + "(google.api.http).body": "configuration", + "(google.api.method_signature)": "configuration,update_mask", + "(google.longrunning.operation_info).response_type": "Configuration", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{configuration.name=projects/*/locations/*/configurations/*}", + "body": "configuration" + } + }, + { + "(google.api.method_signature)": "configuration,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Configuration", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteConfiguration": { + "requestType": "DeleteConfigurationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/configurations/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/configurations/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListInstances": { + "requestType": "ListInstancesRequest", + "responseType": "ListInstancesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/instances", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/instances" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetInstance": { + "requestType": "GetInstanceRequest", + "responseType": "Instance", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/instances/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/instances/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeactivateConfiguration": { + "requestType": "DeactivateConfigurationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/configurations/*}:deactivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Configuration", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/configurations/*}:deactivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Configuration", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ReactivateConfiguration": { + "requestType": "ReactivateConfigurationRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/configurations/*}:reactivate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "Configuration", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/configurations/*}:reactivate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Configuration", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "QueryConfigurationLicenseUsage": { + "requestType": "QueryConfigurationLicenseUsageRequest", + "responseType": "QueryConfigurationLicenseUsageResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/configurations/*}:queryLicenseUsage", + "(google.api.method_signature)": "name,start_time,end_time" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/configurations/*}:queryLicenseUsage" + } + }, + { + "(google.api.method_signature)": "name,start_time,end_time" + } + ] + }, + "AggregateUsage": { + "requestType": "AggregateUsageRequest", + "responseType": "AggregateUsageResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/configurations/*}:aggregateUsage", + "(google.api.method_signature)": "name,start_time,end_time" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/configurations/*}:aggregateUsage" + } + }, + { + "(google.api.method_signature)": "name,start_time,end_time" + } + ] + }, + "ListProducts": { + "requestType": "ListProductsRequest", + "responseType": "ListProductsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/products", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/products" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetProduct": { + "requestType": "GetProductRequest", + "responseType": "Product", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/products/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/products/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ListConfigurationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "licensemanager.googleapis.com/Configuration" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListConfigurationsResponse": { + "fields": { + "configurations": { + "rule": "repeated", + "type": "Configuration", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetConfigurationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Configuration" + } + } + } + }, + "CreateConfigurationRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "licensemanager.googleapis.com/Configuration" + } + }, + "configurationId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "configuration": { + "type": "Configuration", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateConfigurationRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "configuration": { + "type": "Configuration", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteConfigurationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Configuration" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListInstancesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "licensemanager.googleapis.com/Instance" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListInstancesResponse": { + "fields": { + "instances": { + "rule": "repeated", + "type": "Instance", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetInstanceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Instance" + } + } + } + }, + "QueryConfigurationLicenseUsageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Configuration" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "QueryConfigurationLicenseUsageResponse": { + "oneofs": { + "details": { + "oneof": [ + "userCountUsage" + ] + } + }, + "fields": { + "userCountUsage": { + "type": "UserCountUsage", + "id": 1 + } + } + }, + "DeactivateConfigurationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Configuration" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ReactivateConfigurationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Configuration" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_info).format": "UUID4", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AggregateUsageRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Configuration" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AggregateUsageResponse": { + "fields": { + "usages": { + "rule": "repeated", + "type": "Usage", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ListProductsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "licensemanager.googleapis.com/Product" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListProductsResponse": { + "fields": { + "products": { + "rule": "repeated", + "type": "Product", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetProductRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "licensemanager.googleapis.com/Product" + } + } + } + }, + "OperationMetadata": { + "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" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "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": "FieldInfoProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "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 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "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 + } + }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldInfo": { + "type": "google.api.FieldInfo", + "id": 291403980, + "extend": "google.protobuf.FieldOptions" + }, + "FieldInfo": { + "fields": { + "format": { + "type": "Format", + "id": 1 + }, + "referencedTypes": { + "rule": "repeated", + "type": "TypeReference", + "id": 2 + } + }, + "nested": { + "Format": { + "values": { + "FORMAT_UNSPECIFIED": 0, + "UUID4": 1, + "IPV4": 2, + "IPV6": 3, + "IPV4_OR_IPV6": 4 + } + } + } + }, + "TypeReference": { + "fields": { + "typeName": { + "type": "string", + "id": 1 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + "php_generic_services", + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false, + "deprecated": true + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, + "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 + } + } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } + } + }, + "extensions": [ + [ + 1000, + 9994 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + }, + "reserved": [ + [ + 1, + 1 + ] + ] + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "overridableFeatures": { + "type": "FeatureSet", + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 + } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "cloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-licensemanager/samples/README.md b/packages/google-cloud-licensemanager/samples/README.md new file mode 100644 index 000000000000..d1bf404f4746 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/README.md @@ -0,0 +1,284 @@ +[//]: # "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 + +# [License Manager 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) + * [License_manager.aggregate_usage](#license_manager.aggregate_usage) + * [License_manager.create_configuration](#license_manager.create_configuration) + * [License_manager.deactivate_configuration](#license_manager.deactivate_configuration) + * [License_manager.delete_configuration](#license_manager.delete_configuration) + * [License_manager.get_configuration](#license_manager.get_configuration) + * [License_manager.get_instance](#license_manager.get_instance) + * [License_manager.get_product](#license_manager.get_product) + * [License_manager.list_configurations](#license_manager.list_configurations) + * [License_manager.list_instances](#license_manager.list_instances) + * [License_manager.list_products](#license_manager.list_products) + * [License_manager.query_configuration_license_usage](#license_manager.query_configuration_license_usage) + * [License_manager.reactivate_configuration](#license_manager.reactivate_configuration) + * [License_manager.update_configuration](#license_manager.update_configuration) + * [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 + + + +### License_manager.aggregate_usage + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js` + + +----- + + + + +### License_manager.create_configuration + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js` + + +----- + + + + +### License_manager.deactivate_configuration + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js` + + +----- + + + + +### License_manager.delete_configuration + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js` + + +----- + + + + +### License_manager.get_configuration + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js` + + +----- + + + + +### License_manager.get_instance + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js` + + +----- + + + + +### License_manager.get_product + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js` + + +----- + + + + +### License_manager.list_configurations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js` + + +----- + + + + +### License_manager.list_instances + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js` + + +----- + + + + +### License_manager.list_products + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js` + + +----- + + + + +### License_manager.query_configuration_license_usage + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js` + + +----- + + + + +### License_manager.reactivate_configuration + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js` + + +----- + + + + +### License_manager.update_configuration + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-licensemanager/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-licensemanager/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-licensemanager/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://cloud.google.com/compute/docs/instances/windows/ms-licensing diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js new file mode 100644 index 000000000000..c5b7a379c490 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.aggregate_usage.js @@ -0,0 +1,92 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, startTime, endTime) { + // [START licensemanager_v1_generated_LicenseManager_AggregateUsage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for AggregateUsageRequest + */ + // const name = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results + */ + // const orderBy = 'abc123' + /** + * Required. Licenses are purchased per month - so usage track needs start + * time of a month. + */ + // const startTime = {} + /** + * Required. Usage track is always for a month. This parameter is for the end + * time of the month. + */ + // const endTime = {} + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callAggregateUsage() { + // Construct request + const request = { + name, + startTime, + endTime, + }; + + // Run request + const iterable = licensemanagerClient.aggregateUsageAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callAggregateUsage(); + // [END licensemanager_v1_generated_LicenseManager_AggregateUsage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js new file mode 100644 index 000000000000..9a19c95eaf89 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.create_configuration.js @@ -0,0 +1,86 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, configurationId, configuration) { + // [START licensemanager_v1_generated_LicenseManager_CreateConfiguration_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Value for parent. + */ + // const parent = 'abc123' + /** + * Required. Id of the requesting object + */ + // const configurationId = 'abc123' + /** + * Required. The resource being created + */ + // const configuration = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callCreateConfiguration() { + // Construct request + const request = { + parent, + configurationId, + configuration, + }; + + // Run request + const [operation] = await licensemanagerClient.createConfiguration(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateConfiguration(); + // [END licensemanager_v1_generated_LicenseManager_CreateConfiguration_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js new file mode 100644 index 000000000000..1102f22256b0 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.deactivate_configuration.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callDeactivateConfiguration() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await licensemanagerClient.deactivateConfiguration(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeactivateConfiguration(); + // [END licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js new file mode 100644 index 000000000000..ff520d26a4d2 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.delete_configuration.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 licensemanager_v1_generated_LicenseManager_DeleteConfiguration_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callDeleteConfiguration() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await licensemanagerClient.deleteConfiguration(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteConfiguration(); + // [END licensemanager_v1_generated_LicenseManager_DeleteConfiguration_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js new file mode 100644 index 000000000000..abff5f340c01 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_configuration.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START licensemanager_v1_generated_LicenseManager_GetConfiguration_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource + */ + // const name = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callGetConfiguration() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await licensemanagerClient.getConfiguration(request); + console.log(response); + } + + callGetConfiguration(); + // [END licensemanager_v1_generated_LicenseManager_GetConfiguration_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js new file mode 100644 index 000000000000..28e0296c87bb --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_instance.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START licensemanager_v1_generated_LicenseManager_GetInstance_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource + */ + // const name = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callGetInstance() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await licensemanagerClient.getInstance(request); + console.log(response); + } + + callGetInstance(); + // [END licensemanager_v1_generated_LicenseManager_GetInstance_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js new file mode 100644 index 000000000000..9fb888ed1db1 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.get_product.js @@ -0,0 +1,61 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START licensemanager_v1_generated_LicenseManager_GetProduct_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource + */ + // const name = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callGetProduct() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await licensemanagerClient.getProduct(request); + console.log(response); + } + + callGetProduct(); + // [END licensemanager_v1_generated_LicenseManager_GetProduct_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js new file mode 100644 index 000000000000..b256aff07564 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_configurations.js @@ -0,0 +1,80 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START licensemanager_v1_generated_LicenseManager_ListConfigurations_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListConfigurationsRequest + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callListConfigurations() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = licensemanagerClient.listConfigurationsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConfigurations(); + // [END licensemanager_v1_generated_LicenseManager_ListConfigurations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js new file mode 100644 index 000000000000..63f8a1c1e248 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_instances.js @@ -0,0 +1,80 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START licensemanager_v1_generated_LicenseManager_ListInstances_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListInstancesRequest + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callListInstances() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = licensemanagerClient.listInstancesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListInstances(); + // [END licensemanager_v1_generated_LicenseManager_ListInstances_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js new file mode 100644 index 000000000000..54fa659e6cdb --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.list_products.js @@ -0,0 +1,80 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START licensemanager_v1_generated_LicenseManager_ListProducts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent value for ListProductsRequest + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callListProducts() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = licensemanagerClient.listProductsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListProducts(); + // [END licensemanager_v1_generated_LicenseManager_ListProducts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js new file mode 100644 index 000000000000..032b6fe15d1e --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.query_configuration_license_usage.js @@ -0,0 +1,73 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, startTime, endTime) { + // [START licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 path of the Configuration. + */ + // const name = 'abc123' + /** + * Required. The start time for retrieving the usage. If not specified, we + * will use the first day of the current billing period. + */ + // const startTime = {} + /** + * Required. The end time for retrieving the usage. If not specified, we will + * use the last day of the current billing period. + */ + // const endTime = {} + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callQueryConfigurationLicenseUsage() { + // Construct request + const request = { + name, + startTime, + endTime, + }; + + // Run request + const response = await licensemanagerClient.queryConfigurationLicenseUsage(request); + console.log(response); + } + + callQueryConfigurationLicenseUsage(); + // [END licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js new file mode 100644 index 000000000000..318440758359 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.reactivate_configuration.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 resource. + */ + // const name = 'abc123' + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callReactivateConfiguration() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await licensemanagerClient.reactivateConfiguration(request); + const [response] = await operation.promise(); + console.log(response); + } + + callReactivateConfiguration(); + // [END licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js new file mode 100644 index 000000000000..0c46f1175903 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/license_manager.update_configuration.js @@ -0,0 +1,84 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(configuration) { + // [START licensemanager_v1_generated_LicenseManager_UpdateConfiguration_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Configuration resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + */ + // const updateMask = {} + /** + * Required. The resource being updated + */ + // const configuration = {} + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callUpdateConfiguration() { + // Construct request + const request = { + configuration, + }; + + // Run request + const [operation] = await licensemanagerClient.updateConfiguration(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateConfiguration(); + // [END licensemanager_v1_generated_LicenseManager_UpdateConfiguration_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/samples/generated/v1/snippet_metadata_google.cloud.licensemanager.v1.json b/packages/google-cloud-licensemanager/samples/generated/v1/snippet_metadata_google.cloud.licensemanager.v1.json new file mode 100644 index 000000000000..d2de189e4ce0 --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/generated/v1/snippet_metadata_google.cloud.licensemanager.v1.json @@ -0,0 +1,647 @@ +{ + "clientLibrary": { + "name": "nodejs-licensemanager", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.licensemanager.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "licensemanager_v1_generated_LicenseManager_ListConfigurations_async", + "title": "LicenseManager listConfigurations Sample", + "origin": "API_DEFINITION", + "description": " Lists Configurations in a given project and location.", + "canonical": true, + "file": "license_manager.list_configurations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConfigurations", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ListConfigurations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.licensemanager.v1.ListConfigurationsResponse", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "ListConfigurations", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ListConfigurations", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_GetConfiguration_async", + "title": "LicenseManager getConfiguration Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Configuration.", + "canonical": true, + "file": "license_manager.get_configuration.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.GetConfiguration", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.licensemanager.v1.Configuration", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "GetConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.GetConfiguration", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_CreateConfiguration_async", + "title": "LicenseManager createConfiguration Sample", + "origin": "API_DEFINITION", + "description": " Creates a new Configuration in a given project and location.", + "canonical": true, + "file": "license_manager.create_configuration.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.CreateConfiguration", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "configuration_id", + "type": "TYPE_STRING" + }, + { + "name": "configuration", + "type": ".google.cloud.licensemanager.v1.Configuration" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "CreateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.CreateConfiguration", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_UpdateConfiguration_async", + "title": "LicenseManager updateConfiguration Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single Configuration.", + "canonical": true, + "file": "license_manager.update_configuration.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.UpdateConfiguration", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "configuration", + "type": ".google.cloud.licensemanager.v1.Configuration" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "UpdateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.UpdateConfiguration", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_DeleteConfiguration_async", + "title": "LicenseManager deleteConfiguration Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single Configuration.", + "canonical": true, + "file": "license_manager.delete_configuration.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.DeleteConfiguration", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "DeleteConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.DeleteConfiguration", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_ListInstances_async", + "title": "LicenseManager listInstances Sample", + "origin": "API_DEFINITION", + "description": " Lists Instances in a given project and location.", + "canonical": true, + "file": "license_manager.list_instances.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListInstances", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ListInstances", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.licensemanager.v1.ListInstancesResponse", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "ListInstances", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ListInstances", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_GetInstance_async", + "title": "LicenseManager getInstance Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Instance.", + "canonical": true, + "file": "license_manager.get_instance.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetInstance", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.GetInstance", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.licensemanager.v1.Instance", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "GetInstance", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.GetInstance", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_async", + "title": "LicenseManager deactivateConfiguration Sample", + "origin": "API_DEFINITION", + "description": " Deactivates the given configuration.", + "canonical": true, + "file": "license_manager.deactivate_configuration.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeactivateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.DeactivateConfiguration", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "DeactivateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.DeactivateConfiguration", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_async", + "title": "LicenseManager reactivateConfiguration Sample", + "origin": "API_DEFINITION", + "description": " Reactivates the given configuration.", + "canonical": true, + "file": "license_manager.reactivate_configuration.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ReactivateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ReactivateConfiguration", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "ReactivateConfiguration", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ReactivateConfiguration", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_async", + "title": "LicenseManager queryConfigurationLicenseUsage Sample", + "origin": "API_DEFINITION", + "description": " License Usage information for a Configuration.", + "canonical": true, + "file": "license_manager.query_configuration_license_usage.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "QueryConfigurationLicenseUsage", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.QueryConfigurationLicenseUsage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "start_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "end_time", + "type": ".google.protobuf.Timestamp" + } + ], + "resultType": ".google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "QueryConfigurationLicenseUsage", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.QueryConfigurationLicenseUsage", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_AggregateUsage_async", + "title": "LicenseManager aggregateUsage Sample", + "origin": "API_DEFINITION", + "description": " Aggregates Usage per Instance for a Configuration.", + "canonical": true, + "file": "license_manager.aggregate_usage.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 84, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AggregateUsage", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.AggregateUsage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, + { + "name": "start_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "end_time", + "type": ".google.protobuf.Timestamp" + } + ], + "resultType": ".google.cloud.licensemanager.v1.AggregateUsageResponse", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "AggregateUsage", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.AggregateUsage", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_ListProducts_async", + "title": "LicenseManager listProducts Sample", + "origin": "API_DEFINITION", + "description": " Lists Products in a given project and location.", + "canonical": true, + "file": "license_manager.list_products.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProducts", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ListProducts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "order_by", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.licensemanager.v1.ListProductsResponse", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "ListProducts", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.ListProducts", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + }, + { + "regionTag": "licensemanager_v1_generated_LicenseManager_GetProduct_async", + "title": "LicenseManager getProduct Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single Product.", + "canonical": true, + "file": "license_manager.get_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProduct", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.GetProduct", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.licensemanager.v1.Product", + "client": { + "shortName": "LicenseManagerClient", + "fullName": "google.cloud.licensemanager.v1.LicenseManagerClient" + }, + "method": { + "shortName": "GetProduct", + "fullName": "google.cloud.licensemanager.v1.LicenseManager.GetProduct", + "service": { + "shortName": "LicenseManager", + "fullName": "google.cloud.licensemanager.v1.LicenseManager" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-licensemanager/samples/quickstart.js b/packages/google-cloud-licensemanager/samples/quickstart.js new file mode 100644 index 000000000000..d6f0abe0b68a --- /dev/null +++ b/packages/google-cloud-licensemanager/samples/quickstart.js @@ -0,0 +1,80 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START licensemanager_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. Parent value for ListInstancesRequest + */ + // const parent = 'abc123' + /** + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. A token identifying a page of results the server should return. + */ + // const pageToken = 'abc123' + /** + * Optional. Filtering results + */ + // const filter = 'abc123' + /** + * Optional. Hint for how to order the results + */ + // const orderBy = 'abc123' + + // Imports the Licensemanager library + const {LicenseManagerClient} = require('@google-cloud/licensemanager').v1; + + // Instantiates a client + const licensemanagerClient = new LicenseManagerClient(); + + async function callListInstances() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = licensemanagerClient.listInstancesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListInstances(); + // [END licensemanager_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-licensemanager/src/index.ts b/packages/google-cloud-licensemanager/src/index.ts new file mode 100644 index 000000000000..c3ab920dc7cd --- /dev/null +++ b/packages/google-cloud-licensemanager/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const LicenseManagerClient = v1.LicenseManagerClient; +type LicenseManagerClient = v1.LicenseManagerClient; + +export {v1, LicenseManagerClient}; +export default {v1, LicenseManagerClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-licensemanager/src/v1/gapic_metadata.json b/packages/google-cloud-licensemanager/src/v1/gapic_metadata.json new file mode 100644 index 000000000000..917c6ef7e277 --- /dev/null +++ b/packages/google-cloud-licensemanager/src/v1/gapic_metadata.json @@ -0,0 +1,169 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.licensemanager.v1", + "libraryPackage": "@google-cloud/licensemanager", + "services": { + "LicenseManager": { + "clients": { + "grpc": { + "libraryClient": "LicenseManagerClient", + "rpcs": { + "GetConfiguration": { + "methods": [ + "getConfiguration" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "QueryConfigurationLicenseUsage": { + "methods": [ + "queryConfigurationLicenseUsage" + ] + }, + "GetProduct": { + "methods": [ + "getProduct" + ] + }, + "CreateConfiguration": { + "methods": [ + "createConfiguration" + ] + }, + "UpdateConfiguration": { + "methods": [ + "updateConfiguration" + ] + }, + "DeleteConfiguration": { + "methods": [ + "deleteConfiguration" + ] + }, + "DeactivateConfiguration": { + "methods": [ + "deactivateConfiguration" + ] + }, + "ReactivateConfiguration": { + "methods": [ + "reactivateConfiguration" + ] + }, + "ListConfigurations": { + "methods": [ + "listConfigurations", + "listConfigurationsStream", + "listConfigurationsAsync" + ] + }, + "ListInstances": { + "methods": [ + "listInstances", + "listInstancesStream", + "listInstancesAsync" + ] + }, + "AggregateUsage": { + "methods": [ + "aggregateUsage", + "aggregateUsageStream", + "aggregateUsageAsync" + ] + }, + "ListProducts": { + "methods": [ + "listProducts", + "listProductsStream", + "listProductsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "LicenseManagerClient", + "rpcs": { + "GetConfiguration": { + "methods": [ + "getConfiguration" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "QueryConfigurationLicenseUsage": { + "methods": [ + "queryConfigurationLicenseUsage" + ] + }, + "GetProduct": { + "methods": [ + "getProduct" + ] + }, + "CreateConfiguration": { + "methods": [ + "createConfiguration" + ] + }, + "UpdateConfiguration": { + "methods": [ + "updateConfiguration" + ] + }, + "DeleteConfiguration": { + "methods": [ + "deleteConfiguration" + ] + }, + "DeactivateConfiguration": { + "methods": [ + "deactivateConfiguration" + ] + }, + "ReactivateConfiguration": { + "methods": [ + "reactivateConfiguration" + ] + }, + "ListConfigurations": { + "methods": [ + "listConfigurations", + "listConfigurationsStream", + "listConfigurationsAsync" + ] + }, + "ListInstances": { + "methods": [ + "listInstances", + "listInstancesStream", + "listInstancesAsync" + ] + }, + "AggregateUsage": { + "methods": [ + "aggregateUsage", + "aggregateUsageStream", + "aggregateUsageAsync" + ] + }, + "ListProducts": { + "methods": [ + "listProducts", + "listProductsStream", + "listProductsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-licensemanager/src/v1/index.ts b/packages/google-cloud-licensemanager/src/v1/index.ts new file mode 100644 index 000000000000..9477d8fd08c1 --- /dev/null +++ b/packages/google-cloud-licensemanager/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {LicenseManagerClient} from './license_manager_client'; diff --git a/packages/google-cloud-licensemanager/src/v1/license_manager_client.ts b/packages/google-cloud-licensemanager/src/v1/license_manager_client.ts new file mode 100644 index 000000000000..08b7c4179234 --- /dev/null +++ b/packages/google-cloud-licensemanager/src/v1/license_manager_client.ts @@ -0,0 +1,2792 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/license_manager_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './license_manager_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service describing handlers for resources + * @class + * @memberof v1 + */ +export class LicenseManagerClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('licensemanager'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + licenseManagerStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of LicenseManagerClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new LicenseManagerClient({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 LicenseManagerClient; + 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 = 'licensemanager.' + 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; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // 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 = { + configurationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/configurations/{configuration}' + ), + instancePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/instances/{instance}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + productPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/products/{product}' + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}' + ), + }; + + // 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 = { + listConfigurations: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'configurations'), + listInstances: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'instances'), + aggregateUsage: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'usages'), + listProducts: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'products') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createConfigurationResponse = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.Configuration') as gax.protobuf.Type; + const createConfigurationMetadata = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.OperationMetadata') as gax.protobuf.Type; + const updateConfigurationResponse = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.Configuration') as gax.protobuf.Type; + const updateConfigurationMetadata = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.OperationMetadata') as gax.protobuf.Type; + const deleteConfigurationResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteConfigurationMetadata = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.OperationMetadata') as gax.protobuf.Type; + const deactivateConfigurationResponse = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.Configuration') as gax.protobuf.Type; + const deactivateConfigurationMetadata = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.OperationMetadata') as gax.protobuf.Type; + const reactivateConfigurationResponse = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.Configuration') as gax.protobuf.Type; + const reactivateConfigurationMetadata = protoFilesRoot.lookup( + '.google.cloud.licensemanager.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createConfiguration: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createConfigurationResponse.decode.bind(createConfigurationResponse), + createConfigurationMetadata.decode.bind(createConfigurationMetadata)), + updateConfiguration: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateConfigurationResponse.decode.bind(updateConfigurationResponse), + updateConfigurationMetadata.decode.bind(updateConfigurationMetadata)), + deleteConfiguration: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteConfigurationResponse.decode.bind(deleteConfigurationResponse), + deleteConfigurationMetadata.decode.bind(deleteConfigurationMetadata)), + deactivateConfiguration: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deactivateConfigurationResponse.decode.bind(deactivateConfigurationResponse), + deactivateConfigurationMetadata.decode.bind(deactivateConfigurationMetadata)), + reactivateConfiguration: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + reactivateConfigurationResponse.decode.bind(reactivateConfigurationResponse), + reactivateConfigurationMetadata.decode.bind(reactivateConfigurationMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.licensemanager.v1.LicenseManager', 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.licenseManagerStub) { + return this.licenseManagerStub; + } + + // Put together the "service stub" for + // google.cloud.licensemanager.v1.LicenseManager. + this.licenseManagerStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.licensemanager.v1.LicenseManager') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.licensemanager.v1.LicenseManager, + 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 licenseManagerStubMethods = + ['listConfigurations', 'getConfiguration', 'createConfiguration', 'updateConfiguration', 'deleteConfiguration', 'listInstances', 'getInstance', 'deactivateConfiguration', 'reactivateConfiguration', 'queryConfigurationLicenseUsage', 'aggregateUsage', 'listProducts', 'getProduct']; + for (const methodName of licenseManagerStubMethods) { + const callPromise = this.licenseManagerStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.licenseManagerStub; + } + + /** + * 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 'licensemanager.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 'licensemanager.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 details of a single Configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.licensemanager.v1.Configuration|Configuration}. + * 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_manager.get_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_GetConfiguration_async + */ + getConfiguration( + request?: protos.google.cloud.licensemanager.v1.IGetConfigurationRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|undefined, {}|undefined + ]>; + getConfiguration( + request: protos.google.cloud.licensemanager.v1.IGetConfigurationRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|null|undefined, + {}|null|undefined>): void; + getConfiguration( + request: protos.google.cloud.licensemanager.v1.IGetConfigurationRequest, + callback: Callback< + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|null|undefined, + {}|null|undefined>): void; + getConfiguration( + request?: protos.google.cloud.licensemanager.v1.IGetConfigurationRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getConfiguration request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getConfiguration response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getConfiguration(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.licensemanager.v1.IConfiguration, + protos.google.cloud.licensemanager.v1.IGetConfigurationRequest|undefined, + {}|undefined + ]) => { + this._log.info('getConfiguration response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details of a single Instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.licensemanager.v1.Instance|Instance}. + * 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_manager.get_instance.js + * region_tag:licensemanager_v1_generated_LicenseManager_GetInstance_async + */ + getInstance( + request?: protos.google.cloud.licensemanager.v1.IGetInstanceRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|undefined, {}|undefined + ]>; + getInstance( + request: protos.google.cloud.licensemanager.v1.IGetInstanceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>): void; + getInstance( + request: protos.google.cloud.licensemanager.v1.IGetInstanceRequest, + callback: Callback< + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>): void; + getInstance( + request?: protos.google.cloud.licensemanager.v1.IGetInstanceRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getInstance request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getInstance response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getInstance(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.licensemanager.v1.IInstance, + protos.google.cloud.licensemanager.v1.IGetInstanceRequest|undefined, + {}|undefined + ]) => { + this._log.info('getInstance response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * License Usage information for a Configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource path of the Configuration. + * @param {google.protobuf.Timestamp} request.startTime + * Required. The start time for retrieving the usage. If not specified, we + * will use the first day of the current billing period. + * @param {google.protobuf.Timestamp} request.endTime + * Required. The end time for retrieving the usage. If not specified, we will + * use the last day of the current billing period. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.licensemanager.v1.QueryConfigurationLicenseUsageResponse|QueryConfigurationLicenseUsageResponse}. + * 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_manager.query_configuration_license_usage.js + * region_tag:licensemanager_v1_generated_LicenseManager_QueryConfigurationLicenseUsage_async + */ + queryConfigurationLicenseUsage( + request?: protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|undefined, {}|undefined + ]>; + queryConfigurationLicenseUsage( + request: protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|null|undefined, + {}|null|undefined>): void; + queryConfigurationLicenseUsage( + request: protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest, + callback: Callback< + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|null|undefined, + {}|null|undefined>): void; + queryConfigurationLicenseUsage( + request?: protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('queryConfigurationLicenseUsage request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('queryConfigurationLicenseUsage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.queryConfigurationLicenseUsage(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse, + protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageRequest|undefined, + {}|undefined + ]) => { + this._log.info('queryConfigurationLicenseUsage response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Gets details of a single Product. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.licensemanager.v1.Product|Product}. + * 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_manager.get_product.js + * region_tag:licensemanager_v1_generated_LicenseManager_GetProduct_async + */ + getProduct( + request?: protos.google.cloud.licensemanager.v1.IGetProductRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|undefined, {}|undefined + ]>; + getProduct( + request: protos.google.cloud.licensemanager.v1.IGetProductRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|null|undefined, + {}|null|undefined>): void; + getProduct( + request: protos.google.cloud.licensemanager.v1.IGetProductRequest, + callback: Callback< + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|null|undefined, + {}|null|undefined>): void; + getProduct( + request?: protos.google.cloud.licensemanager.v1.IGetProductRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getProduct request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getProduct response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getProduct(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.licensemanager.v1.IProduct, + protos.google.cloud.licensemanager.v1.IGetProductRequest|undefined, + {}|undefined + ]) => { + this._log.info('getProduct response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates a new Configuration in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Value for parent. + * @param {string} request.configurationId + * Required. Id of the requesting object + * @param {google.cloud.licensemanager.v1.Configuration} request.configuration + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/license_manager.create_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_CreateConfiguration_async + */ + createConfiguration( + request?: protos.google.cloud.licensemanager.v1.ICreateConfigurationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createConfiguration( + request: protos.google.cloud.licensemanager.v1.ICreateConfigurationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConfiguration( + request: protos.google.cloud.licensemanager.v1.ICreateConfigurationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createConfiguration( + request?: protos.google.cloud.licensemanager.v1.ICreateConfigurationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createConfiguration response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createConfiguration request %j', request); + return this.innerApiCalls.createConfiguration(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createConfiguration response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createConfiguration()`. + * @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/license_manager.create_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_CreateConfiguration_async + */ + async checkCreateConfigurationProgress(name: string): Promise>{ + this._log.info('createConfiguration long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createConfiguration, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single Configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask is used to specify the fields to be overwritten in the + * Configuration resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @param {google.cloud.licensemanager.v1.Configuration} request.configuration + * Required. The resource being updated + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/license_manager.update_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_UpdateConfiguration_async + */ + updateConfiguration( + request?: protos.google.cloud.licensemanager.v1.IUpdateConfigurationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateConfiguration( + request: protos.google.cloud.licensemanager.v1.IUpdateConfigurationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConfiguration( + request: protos.google.cloud.licensemanager.v1.IUpdateConfigurationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateConfiguration( + request?: protos.google.cloud.licensemanager.v1.IUpdateConfigurationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'configuration.name': request.configuration!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateConfiguration response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateConfiguration request %j', request); + return this.innerApiCalls.updateConfiguration(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateConfiguration response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateConfiguration()`. + * @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/license_manager.update_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_UpdateConfiguration_async + */ + async checkUpdateConfigurationProgress(name: string): Promise>{ + this._log.info('updateConfiguration long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateConfiguration, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single Configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/license_manager.delete_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_DeleteConfiguration_async + */ + deleteConfiguration( + request?: protos.google.cloud.licensemanager.v1.IDeleteConfigurationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteConfiguration( + request: protos.google.cloud.licensemanager.v1.IDeleteConfigurationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConfiguration( + request: protos.google.cloud.licensemanager.v1.IDeleteConfigurationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteConfiguration( + request?: protos.google.cloud.licensemanager.v1.IDeleteConfigurationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteConfiguration response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteConfiguration request %j', request); + return this.innerApiCalls.deleteConfiguration(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteConfiguration response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteConfiguration()`. + * @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/license_manager.delete_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_DeleteConfiguration_async + */ + async checkDeleteConfigurationProgress(name: string): Promise>{ + this._log.info('deleteConfiguration long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteConfiguration, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deactivates the given configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/license_manager.deactivate_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_async + */ + deactivateConfiguration( + request?: protos.google.cloud.licensemanager.v1.IDeactivateConfigurationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deactivateConfiguration( + request: protos.google.cloud.licensemanager.v1.IDeactivateConfigurationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deactivateConfiguration( + request: protos.google.cloud.licensemanager.v1.IDeactivateConfigurationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deactivateConfiguration( + request?: protos.google.cloud.licensemanager.v1.IDeactivateConfigurationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deactivateConfiguration response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deactivateConfiguration request %j', request); + return this.innerApiCalls.deactivateConfiguration(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deactivateConfiguration response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deactivateConfiguration()`. + * @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/license_manager.deactivate_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_DeactivateConfiguration_async + */ + async checkDeactivateConfigurationProgress(name: string): Promise>{ + this._log.info('deactivateConfiguration long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deactivateConfiguration, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Reactivates the given configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the resource. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/license_manager.reactivate_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_async + */ + reactivateConfiguration( + request?: protos.google.cloud.licensemanager.v1.IReactivateConfigurationRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + reactivateConfiguration( + request: protos.google.cloud.licensemanager.v1.IReactivateConfigurationRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + reactivateConfiguration( + request: protos.google.cloud.licensemanager.v1.IReactivateConfigurationRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + reactivateConfiguration( + request?: protos.google.cloud.licensemanager.v1.IReactivateConfigurationRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('reactivateConfiguration response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('reactivateConfiguration request %j', request); + return this.innerApiCalls.reactivateConfiguration(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('reactivateConfiguration response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `reactivateConfiguration()`. + * @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/license_manager.reactivate_configuration.js + * region_tag:licensemanager_v1_generated_LicenseManager_ReactivateConfiguration_async + */ + async checkReactivateConfigurationProgress(name: string): Promise>{ + this._log.info('reactivateConfiguration long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.reactivateConfiguration, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists Configurations in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConfigurationsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.licensemanager.v1.Configuration|Configuration}. + * 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 `listConfigurationsAsync()` + * 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. + */ + listConfigurations( + request?: protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IConfiguration[], + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest|null, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse + ]>; + listConfigurations( + request: protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IConfiguration>): void; + listConfigurations( + request: protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IConfiguration>): void; + listConfigurations( + request?: protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IConfiguration>, + callback?: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IConfiguration>): + Promise<[ + protos.google.cloud.licensemanager.v1.IConfiguration[], + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest|null, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IConfiguration>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listConfigurations values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listConfigurations request %j', request); + return this.innerApiCalls + .listConfigurations(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.licensemanager.v1.IConfiguration[], + protos.google.cloud.licensemanager.v1.IListConfigurationsRequest|null, + protos.google.cloud.licensemanager.v1.IListConfigurationsResponse + ]) => { + this._log.info('listConfigurations values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listConfigurations`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListConfigurationsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @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.licensemanager.v1.Configuration|Configuration} 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 `listConfigurationsAsync()` + * 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. + */ + listConfigurationsStream( + request?: protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + 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['listConfigurations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listConfigurations stream %j', request); + return this.descriptors.page.listConfigurations.createStream( + this.innerApiCalls.listConfigurations as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listConfigurations`, 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. Parent value for ListConfigurationsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @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.licensemanager.v1.Configuration|Configuration}. 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_manager.list_configurations.js + * region_tag:licensemanager_v1_generated_LicenseManager_ListConfigurations_async + */ + listConfigurationsAsync( + request?: protos.google.cloud.licensemanager.v1.IListConfigurationsRequest, + 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['listConfigurations']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listConfigurations iterate %j', request); + return this.descriptors.page.listConfigurations.asyncIterate( + this.innerApiCalls['listConfigurations'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Instances in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListInstancesRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.licensemanager.v1.Instance|Instance}. + * 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 `listInstancesAsync()` + * 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. + */ + listInstances( + request?: protos.google.cloud.licensemanager.v1.IListInstancesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IInstance[], + protos.google.cloud.licensemanager.v1.IListInstancesRequest|null, + protos.google.cloud.licensemanager.v1.IListInstancesResponse + ]>; + listInstances( + request: protos.google.cloud.licensemanager.v1.IListInstancesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListInstancesRequest, + protos.google.cloud.licensemanager.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IInstance>): void; + listInstances( + request: protos.google.cloud.licensemanager.v1.IListInstancesRequest, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListInstancesRequest, + protos.google.cloud.licensemanager.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IInstance>): void; + listInstances( + request?: protos.google.cloud.licensemanager.v1.IListInstancesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.licensemanager.v1.IListInstancesRequest, + protos.google.cloud.licensemanager.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IInstance>, + callback?: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListInstancesRequest, + protos.google.cloud.licensemanager.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IInstance>): + Promise<[ + protos.google.cloud.licensemanager.v1.IInstance[], + protos.google.cloud.licensemanager.v1.IListInstancesRequest|null, + protos.google.cloud.licensemanager.v1.IListInstancesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListInstancesRequest, + protos.google.cloud.licensemanager.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IInstance>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listInstances values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listInstances request %j', request); + return this.innerApiCalls + .listInstances(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.licensemanager.v1.IInstance[], + protos.google.cloud.licensemanager.v1.IListInstancesRequest|null, + protos.google.cloud.licensemanager.v1.IListInstancesResponse + ]) => { + this._log.info('listInstances values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listInstances`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListInstancesRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @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.licensemanager.v1.Instance|Instance} 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 `listInstancesAsync()` + * 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. + */ + listInstancesStream( + request?: protos.google.cloud.licensemanager.v1.IListInstancesRequest, + 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['listInstances']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listInstances stream %j', request); + return this.descriptors.page.listInstances.createStream( + this.innerApiCalls.listInstances as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listInstances`, 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. Parent value for ListInstancesRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @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.licensemanager.v1.Instance|Instance}. 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_manager.list_instances.js + * region_tag:licensemanager_v1_generated_LicenseManager_ListInstances_async + */ + listInstancesAsync( + request?: protos.google.cloud.licensemanager.v1.IListInstancesRequest, + 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['listInstances']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listInstances iterate %j', request); + return this.descriptors.page.listInstances.asyncIterate( + this.innerApiCalls['listInstances'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Aggregates Usage per Instance for a Configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Parent value for AggregateUsageRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @param {google.protobuf.Timestamp} request.startTime + * Required. Licenses are purchased per month - so usage track needs start + * time of a month. + * @param {google.protobuf.Timestamp} request.endTime + * Required. Usage track is always for a month. This parameter is for the end + * time of the month. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.licensemanager.v1.Usage|Usage}. + * 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 `aggregateUsageAsync()` + * 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. + */ + aggregateUsage( + request?: protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IUsage[], + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest|null, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse + ]>; + aggregateUsage( + request: protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IUsage>): void; + aggregateUsage( + request: protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IUsage>): void; + aggregateUsage( + request?: protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IUsage>, + callback?: PaginationCallback< + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IUsage>): + Promise<[ + protos.google.cloud.licensemanager.v1.IUsage[], + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest|null, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IUsage>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('aggregateUsage values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('aggregateUsage request %j', request); + return this.innerApiCalls + .aggregateUsage(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.licensemanager.v1.IUsage[], + protos.google.cloud.licensemanager.v1.IAggregateUsageRequest|null, + protos.google.cloud.licensemanager.v1.IAggregateUsageResponse + ]) => { + this._log.info('aggregateUsage values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `aggregateUsage`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Parent value for AggregateUsageRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @param {google.protobuf.Timestamp} request.startTime + * Required. Licenses are purchased per month - so usage track needs start + * time of a month. + * @param {google.protobuf.Timestamp} request.endTime + * Required. Usage track is always for a month. This parameter is for the end + * time of the month. + * @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.licensemanager.v1.Usage|Usage} 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 `aggregateUsageAsync()` + * 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. + */ + aggregateUsageStream( + request?: protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + 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({ + 'name': request.name ?? '', + }); + const defaultCallSettings = this._defaults['aggregateUsage']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('aggregateUsage stream %j', request); + return this.descriptors.page.aggregateUsage.createStream( + this.innerApiCalls.aggregateUsage as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `aggregateUsage`, 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.name + * Required. Parent value for AggregateUsageRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @param {google.protobuf.Timestamp} request.startTime + * Required. Licenses are purchased per month - so usage track needs start + * time of a month. + * @param {google.protobuf.Timestamp} request.endTime + * Required. Usage track is always for a month. This parameter is for the end + * time of the month. + * @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.licensemanager.v1.Usage|Usage}. 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_manager.aggregate_usage.js + * region_tag:licensemanager_v1_generated_LicenseManager_AggregateUsage_async + */ + aggregateUsageAsync( + request?: protos.google.cloud.licensemanager.v1.IAggregateUsageRequest, + 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({ + 'name': request.name ?? '', + }); + const defaultCallSettings = this._defaults['aggregateUsage']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('aggregateUsage iterate %j', request); + return this.descriptors.page.aggregateUsage.asyncIterate( + this.innerApiCalls['aggregateUsage'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Products in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListProductsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.licensemanager.v1.Product|Product}. + * 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 `listProductsAsync()` + * 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. + */ + listProducts( + request?: protos.google.cloud.licensemanager.v1.IListProductsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.licensemanager.v1.IProduct[], + protos.google.cloud.licensemanager.v1.IListProductsRequest|null, + protos.google.cloud.licensemanager.v1.IListProductsResponse + ]>; + listProducts( + request: protos.google.cloud.licensemanager.v1.IListProductsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListProductsRequest, + protos.google.cloud.licensemanager.v1.IListProductsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IProduct>): void; + listProducts( + request: protos.google.cloud.licensemanager.v1.IListProductsRequest, + callback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListProductsRequest, + protos.google.cloud.licensemanager.v1.IListProductsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IProduct>): void; + listProducts( + request?: protos.google.cloud.licensemanager.v1.IListProductsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.licensemanager.v1.IListProductsRequest, + protos.google.cloud.licensemanager.v1.IListProductsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IProduct>, + callback?: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListProductsRequest, + protos.google.cloud.licensemanager.v1.IListProductsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IProduct>): + Promise<[ + protos.google.cloud.licensemanager.v1.IProduct[], + protos.google.cloud.licensemanager.v1.IListProductsRequest|null, + protos.google.cloud.licensemanager.v1.IListProductsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.licensemanager.v1.IListProductsRequest, + protos.google.cloud.licensemanager.v1.IListProductsResponse|null|undefined, + protos.google.cloud.licensemanager.v1.IProduct>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listProducts values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listProducts request %j', request); + return this.innerApiCalls + .listProducts(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.licensemanager.v1.IProduct[], + protos.google.cloud.licensemanager.v1.IListProductsRequest|null, + protos.google.cloud.licensemanager.v1.IListProductsResponse + ]) => { + this._log.info('listProducts values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listProducts`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent value for ListProductsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @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.licensemanager.v1.Product|Product} 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 `listProductsAsync()` + * 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. + */ + listProductsStream( + request?: protos.google.cloud.licensemanager.v1.IListProductsRequest, + 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['listProducts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listProducts stream %j', request); + return this.descriptors.page.listProducts.createStream( + this.innerApiCalls.listProducts as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listProducts`, 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. Parent value for ListProductsRequest + * @param {number} [request.pageSize] + * Optional. Requested page size. Server may return fewer items than + * requested. If unspecified, server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results + * @param {string} [request.orderBy] + * Optional. Hint for how to order the results + * @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.licensemanager.v1.Product|Product}. 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_manager.list_products.js + * region_tag:licensemanager_v1_generated_LicenseManager_ListProducts_async + */ + listProductsAsync( + request?: protos.google.cloud.licensemanager.v1.IListProductsRequest, + 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['listProducts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listProducts iterate %j', request); + return this.descriptors.page.listProducts.asyncIterate( + this.innerApiCalls['listProducts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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 google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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 google.cloud.location.Location | Location}. 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 + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified configuration resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} configuration + * @returns {string} Resource name string. + */ + configurationPath(project:string,location:string,configuration:string) { + return this.pathTemplates.configurationPathTemplate.render({ + project: project, + location: location, + configuration: configuration, + }); + } + + /** + * Parse the project from Configuration resource. + * + * @param {string} configurationName + * A fully-qualified path representing Configuration resource. + * @returns {string} A string representing the project. + */ + matchProjectFromConfigurationName(configurationName: string) { + return this.pathTemplates.configurationPathTemplate.match(configurationName).project; + } + + /** + * Parse the location from Configuration resource. + * + * @param {string} configurationName + * A fully-qualified path representing Configuration resource. + * @returns {string} A string representing the location. + */ + matchLocationFromConfigurationName(configurationName: string) { + return this.pathTemplates.configurationPathTemplate.match(configurationName).location; + } + + /** + * Parse the configuration from Configuration resource. + * + * @param {string} configurationName + * A fully-qualified path representing Configuration resource. + * @returns {string} A string representing the configuration. + */ + matchConfigurationFromConfigurationName(configurationName: string) { + return this.pathTemplates.configurationPathTemplate.match(configurationName).configuration; + } + + /** + * Return a fully-qualified instance resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} instance + * @returns {string} Resource name string. + */ + instancePath(project:string,location:string,instance:string) { + return this.pathTemplates.instancePathTemplate.render({ + project: project, + location: location, + instance: instance, + }); + } + + /** + * Parse the project from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the project. + */ + matchProjectFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).project; + } + + /** + * Parse the location from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the location. + */ + matchLocationFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).location; + } + + /** + * Parse the instance from Instance resource. + * + * @param {string} instanceName + * A fully-qualified path representing Instance resource. + * @returns {string} A string representing the instance. + */ + matchInstanceFromInstanceName(instanceName: string) { + return this.pathTemplates.instancePathTemplate.match(instanceName).instance; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project:string,location:string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified product resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} product + * @returns {string} Resource name string. + */ + productPath(project:string,location:string,product:string) { + return this.pathTemplates.productPathTemplate.render({ + project: project, + location: location, + product: product, + }); + } + + /** + * Parse the project from Product resource. + * + * @param {string} productName + * A fully-qualified path representing Product resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProductName(productName: string) { + return this.pathTemplates.productPathTemplate.match(productName).project; + } + + /** + * Parse the location from Product resource. + * + * @param {string} productName + * A fully-qualified path representing Product resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProductName(productName: string) { + return this.pathTemplates.productPathTemplate.match(productName).location; + } + + /** + * Parse the product from Product resource. + * + * @param {string} productName + * A fully-qualified path representing Product resource. + * @returns {string} A string representing the product. + */ + matchProductFromProductName(productName: string) { + return this.pathTemplates.productPathTemplate.match(productName).product; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project:string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * 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.licenseManagerStub && !this._terminated) { + return this.licenseManagerStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-licensemanager/src/v1/license_manager_client_config.json b/packages/google-cloud-licensemanager/src/v1/license_manager_client_config.json new file mode 100644 index 000000000000..3fbfe64a2d5d --- /dev/null +++ b/packages/google-cloud-licensemanager/src/v1/license_manager_client_config.json @@ -0,0 +1,101 @@ +{ + "interfaces": { + "google.cloud.licensemanager.v1.LicenseManager": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "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 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ListConfigurations": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetConfiguration": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateConfiguration": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConfiguration": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConfiguration": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeactivateConfiguration": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ReactivateConfiguration": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "QueryConfigurationLicenseUsage": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "AggregateUsage": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListProducts": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetProduct": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/packages/google-cloud-licensemanager/src/v1/license_manager_proto_list.json b/packages/google-cloud-licensemanager/src/v1/license_manager_proto_list.json new file mode 100644 index 000000000000..6941cd96dea5 --- /dev/null +++ b/packages/google-cloud-licensemanager/src/v1/license_manager_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/licensemanager/v1/api_entities.proto", + "../../protos/google/cloud/licensemanager/v1/licensemanager.proto" +] diff --git a/packages/google-cloud-licensemanager/system-test/fixtures/sample/src/index.js b/packages/google-cloud-licensemanager/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..5d049419db84 --- /dev/null +++ b/packages/google-cloud-licensemanager/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const licensemanager = require('@google-cloud/licensemanager'); + +function main() { + const licenseManagerClient = new licensemanager.LicenseManagerClient(); +} + +main(); diff --git a/packages/google-cloud-licensemanager/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-licensemanager/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..570ffbf0655d --- /dev/null +++ b/packages/google-cloud-licensemanager/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {LicenseManagerClient} from '@google-cloud/licensemanager'; + +// check that the client class type name can be used +function doStuffWithLicenseManagerClient(client: LicenseManagerClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const licenseManagerClient = new LicenseManagerClient(); + doStuffWithLicenseManagerClient(licenseManagerClient); +} + +main(); diff --git a/packages/google-cloud-licensemanager/system-test/install.ts b/packages/google-cloud-licensemanager/system-test/install.ts new file mode 100644 index 000000000000..2a505d6df0c5 --- /dev/null +++ b/packages/google-cloud-licensemanager/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/google-cloud-licensemanager/test/gapic_license_manager_v1.ts b/packages/google-cloud-licensemanager/test/gapic_license_manager_v1.ts new file mode 100644 index 000000000000..0e5e5634c161 --- /dev/null +++ b/packages/google-cloud-licensemanager/test/gapic_license_manager_v1.ts @@ -0,0 +1,3093 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 licensemanagerModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.LicenseManagerClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new licensemanagerModule.v1.LicenseManagerClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'licensemanager.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new licensemanagerModule.v1.LicenseManagerClient(); + 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 = licensemanagerModule.v1.LicenseManagerClient.servicePath; + assert.strictEqual(servicePath, 'licensemanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = licensemanagerModule.v1.LicenseManagerClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'licensemanager.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'licensemanager.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'licensemanager.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 licensemanagerModule.v1.LicenseManagerClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'licensemanager.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 licensemanagerModule.v1.LicenseManagerClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'licensemanager.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 licensemanagerModule.v1.LicenseManagerClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = licensemanagerModule.v1.LicenseManagerClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new licensemanagerModule.v1.LicenseManagerClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.licenseManagerStub, undefined); + await client.initialize(); + assert(client.licenseManagerStub); + }); + + it('has close method for the initialized client', done => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.licenseManagerStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.licenseManagerStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new licensemanagerModule.v1.LicenseManagerClient({ + 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 licensemanagerModule.v1.LicenseManagerClient({ + 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('getConfiguration', () => { + it('invokes getConfiguration without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.Configuration() + ); + client.innerApiCalls.getConfiguration = stubSimpleCall(expectedResponse); + const [response] = await client.getConfiguration(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfiguration without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.Configuration() + ); + client.innerApiCalls.getConfiguration = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConfiguration( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IConfiguration|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfiguration with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConfiguration = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getConfiguration(request), expectedError); + const actualRequest = (client.innerApiCalls.getConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConfiguration with closed client', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getConfiguration(request), expectedError); + }); + }); + + describe('getInstance', () => { + it('invokes getInstance without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.Instance() + ); + client.innerApiCalls.getInstance = stubSimpleCall(expectedResponse); + const [response] = await client.getInstance(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInstance without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.Instance() + ); + client.innerApiCalls.getInstance = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInstance( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IInstance|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInstance with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getInstance = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getInstance(request), expectedError); + const actualRequest = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInstance with closed client', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getInstance(request), expectedError); + }); + }); + + describe('queryConfigurationLicenseUsage', () => { + it('invokes queryConfigurationLicenseUsage without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse() + ); + client.innerApiCalls.queryConfigurationLicenseUsage = stubSimpleCall(expectedResponse); + const [response] = await client.queryConfigurationLicenseUsage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryConfigurationLicenseUsage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryConfigurationLicenseUsage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryConfigurationLicenseUsage without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageResponse() + ); + client.innerApiCalls.queryConfigurationLicenseUsage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.queryConfigurationLicenseUsage( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IQueryConfigurationLicenseUsageResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.queryConfigurationLicenseUsage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryConfigurationLicenseUsage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryConfigurationLicenseUsage with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.queryConfigurationLicenseUsage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.queryConfigurationLicenseUsage(request), expectedError); + const actualRequest = (client.innerApiCalls.queryConfigurationLicenseUsage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.queryConfigurationLicenseUsage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes queryConfigurationLicenseUsage with closed client', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.QueryConfigurationLicenseUsageRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.queryConfigurationLicenseUsage(request), expectedError); + }); + }); + + describe('getProduct', () => { + it('invokes getProduct without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetProductRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetProductRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.Product() + ); + client.innerApiCalls.getProduct = stubSimpleCall(expectedResponse); + const [response] = await client.getProduct(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getProduct as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProduct as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProduct without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetProductRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetProductRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.Product() + ); + client.innerApiCalls.getProduct = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProduct( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IProduct|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getProduct as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProduct as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProduct with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetProductRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetProductRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getProduct = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getProduct(request), expectedError); + const actualRequest = (client.innerApiCalls.getProduct as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getProduct as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProduct with closed client', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.GetProductRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.GetProductRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getProduct(request), expectedError); + }); + }); + + describe('createConfiguration', () => { + it('invokes createConfiguration without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.CreateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.CreateConfigurationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConfiguration = stubLongRunningCall(expectedResponse); + const [operation] = await client.createConfiguration(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConfiguration without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.CreateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.CreateConfigurationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createConfiguration = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConfiguration( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConfiguration with call error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.CreateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.CreateConfigurationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConfiguration = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createConfiguration(request), expectedError); + const actualRequest = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConfiguration with LRO error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.CreateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.CreateConfigurationRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConfiguration = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createConfiguration(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateConfigurationProgress without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateConfigurationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateConfigurationProgress with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateConfigurationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateConfiguration', () => { + it('invokes updateConfiguration without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.UpdateConfigurationRequest() + ); + request.configuration ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.UpdateConfigurationRequest', ['configuration', 'name']); + request.configuration.name = defaultValue1; + const expectedHeaderRequestParams = `configuration.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConfiguration = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateConfiguration(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConfiguration without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.UpdateConfigurationRequest() + ); + request.configuration ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.UpdateConfigurationRequest', ['configuration', 'name']); + request.configuration.name = defaultValue1; + const expectedHeaderRequestParams = `configuration.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateConfiguration = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConfiguration( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConfiguration with call error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.UpdateConfigurationRequest() + ); + request.configuration ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.UpdateConfigurationRequest', ['configuration', 'name']); + request.configuration.name = defaultValue1; + const expectedHeaderRequestParams = `configuration.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConfiguration = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateConfiguration(request), expectedError); + const actualRequest = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConfiguration with LRO error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.UpdateConfigurationRequest() + ); + request.configuration ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.UpdateConfigurationRequest', ['configuration', 'name']); + request.configuration.name = defaultValue1; + const expectedHeaderRequestParams = `configuration.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConfiguration = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateConfiguration(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateConfigurationProgress without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateConfigurationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateConfigurationProgress with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateConfigurationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteConfiguration', () => { + it('invokes deleteConfiguration without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeleteConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeleteConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConfiguration = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteConfiguration(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConfiguration without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeleteConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeleteConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteConfiguration = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConfiguration( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConfiguration with call error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeleteConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeleteConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConfiguration = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteConfiguration(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConfiguration with LRO error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeleteConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeleteConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConfiguration = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteConfiguration(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteConfigurationProgress without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteConfigurationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteConfigurationProgress with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteConfigurationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deactivateConfiguration', () => { + it('invokes deactivateConfiguration without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deactivateConfiguration = stubLongRunningCall(expectedResponse); + const [operation] = await client.deactivateConfiguration(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deactivateConfiguration without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deactivateConfiguration = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deactivateConfiguration( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deactivateConfiguration with call error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deactivateConfiguration = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deactivateConfiguration(request), expectedError); + const actualRequest = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deactivateConfiguration with LRO error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.DeactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.DeactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deactivateConfiguration = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deactivateConfiguration(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeactivateConfigurationProgress without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeactivateConfigurationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeactivateConfigurationProgress with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeactivateConfigurationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('reactivateConfiguration', () => { + it('invokes reactivateConfiguration without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ReactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ReactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reactivateConfiguration = stubLongRunningCall(expectedResponse); + const [operation] = await client.reactivateConfiguration(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reactivateConfiguration without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ReactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ReactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.reactivateConfiguration = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.reactivateConfiguration( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reactivateConfiguration with call error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ReactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ReactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.reactivateConfiguration = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.reactivateConfiguration(request), expectedError); + const actualRequest = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reactivateConfiguration with LRO error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ReactivateConfigurationRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ReactivateConfigurationRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.reactivateConfiguration = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.reactivateConfiguration(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.reactivateConfiguration as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkReactivateConfigurationProgress without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkReactivateConfigurationProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkReactivateConfigurationProgress with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkReactivateConfigurationProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listConfigurations', () => { + it('invokes listConfigurations without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListConfigurationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListConfigurationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + ]; + client.innerApiCalls.listConfigurations = stubSimpleCall(expectedResponse); + const [response] = await client.listConfigurations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConfigurations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConfigurations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConfigurations without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListConfigurationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListConfigurationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + ]; + client.innerApiCalls.listConfigurations = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConfigurations( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IConfiguration[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listConfigurations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConfigurations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConfigurations with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListConfigurationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListConfigurationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConfigurations = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listConfigurations(request), expectedError); + const actualRequest = (client.innerApiCalls.listConfigurations as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listConfigurations as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConfigurationsStream without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListConfigurationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListConfigurationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + ]; + client.descriptors.page.listConfigurations.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listConfigurationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Configuration[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Configuration) => { + 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.listConfigurations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConfigurations, request)); + assert( + (client.descriptors.page.listConfigurations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConfigurationsStream with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListConfigurationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListConfigurationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listConfigurations.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listConfigurationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Configuration[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Configuration) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listConfigurations.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listConfigurations, request)); + assert( + (client.descriptors.page.listConfigurations.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConfigurations without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListConfigurationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListConfigurationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Configuration()), + ]; + client.descriptors.page.listConfigurations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.licensemanager.v1.IConfiguration[] = []; + const iterable = client.listConfigurationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listConfigurations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConfigurations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConfigurations with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListConfigurationsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListConfigurationsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listConfigurations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConfigurationsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.licensemanager.v1.IConfiguration[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listConfigurations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listConfigurations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listInstances', () => { + it('invokes listInstances without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + ]; + client.innerApiCalls.listInstances = stubSimpleCall(expectedResponse); + const [response] = await client.listInstances(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstances without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + ]; + client.innerApiCalls.listInstances = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInstances( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IInstance[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstances with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listInstances = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listInstances(request), expectedError); + const actualRequest = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstancesStream without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + ]; + client.descriptors.page.listInstances.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listInstancesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Instance[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Instance) => { + 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.listInstances.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listInstances, request)); + assert( + (client.descriptors.page.listInstances.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listInstancesStream with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listInstances.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listInstancesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Instance[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Instance) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listInstances.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listInstances, request)); + assert( + (client.descriptors.page.listInstances.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listInstances without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Instance()), + ]; + client.descriptors.page.listInstances.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.licensemanager.v1.IInstance[] = []; + const iterable = client.listInstancesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listInstances with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listInstances.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listInstancesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.licensemanager.v1.IInstance[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('aggregateUsage', () => { + it('invokes aggregateUsage without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.AggregateUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.AggregateUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + ]; + client.innerApiCalls.aggregateUsage = stubSimpleCall(expectedResponse); + const [response] = await client.aggregateUsage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.aggregateUsage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.aggregateUsage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes aggregateUsage without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.AggregateUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.AggregateUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + ]; + client.innerApiCalls.aggregateUsage = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.aggregateUsage( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IUsage[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.aggregateUsage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.aggregateUsage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes aggregateUsage with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.AggregateUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.AggregateUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.aggregateUsage = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.aggregateUsage(request), expectedError); + const actualRequest = (client.innerApiCalls.aggregateUsage as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.aggregateUsage as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes aggregateUsageStream without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.AggregateUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.AggregateUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + ]; + client.descriptors.page.aggregateUsage.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.aggregateUsageStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Usage[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Usage) => { + 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.aggregateUsage.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.aggregateUsage, request)); + assert( + (client.descriptors.page.aggregateUsage.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes aggregateUsageStream with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.AggregateUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.AggregateUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.aggregateUsage.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.aggregateUsageStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Usage[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Usage) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.aggregateUsage.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.aggregateUsage, request)); + assert( + (client.descriptors.page.aggregateUsage.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with aggregateUsage without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.AggregateUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.AggregateUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Usage()), + ]; + client.descriptors.page.aggregateUsage.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.licensemanager.v1.IUsage[] = []; + const iterable = client.aggregateUsageAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.aggregateUsage.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.aggregateUsage.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with aggregateUsage with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.AggregateUsageRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.AggregateUsageRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.aggregateUsage.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.aggregateUsageAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.licensemanager.v1.IUsage[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.aggregateUsage.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.aggregateUsage.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listProducts', () => { + it('invokes listProducts without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListProductsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListProductsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + ]; + client.innerApiCalls.listProducts = stubSimpleCall(expectedResponse); + const [response] = await client.listProducts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listProducts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listProducts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProducts without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListProductsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListProductsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + ]; + client.innerApiCalls.listProducts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProducts( + request, + (err?: Error|null, result?: protos.google.cloud.licensemanager.v1.IProduct[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listProducts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listProducts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProducts with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListProductsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListProductsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listProducts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listProducts(request), expectedError); + const actualRequest = (client.innerApiCalls.listProducts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listProducts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProductsStream without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListProductsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListProductsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + ]; + client.descriptors.page.listProducts.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listProductsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Product[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Product) => { + 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.listProducts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listProducts, request)); + assert( + (client.descriptors.page.listProducts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listProductsStream with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListProductsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListProductsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listProducts.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listProductsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.licensemanager.v1.Product[] = []; + stream.on('data', (response: protos.google.cloud.licensemanager.v1.Product) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listProducts.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listProducts, request)); + assert( + (client.descriptors.page.listProducts.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listProducts without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListProductsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListProductsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + generateSampleMessage(new protos.google.cloud.licensemanager.v1.Product()), + ]; + client.descriptors.page.listProducts.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.licensemanager.v1.IProduct[] = []; + const iterable = client.listProductsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listProducts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listProducts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listProducts with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.licensemanager.v1.ListProductsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.licensemanager.v1.ListProductsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listProducts.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listProductsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.licensemanager.v1.IProduct[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listProducts.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listProducts.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('configuration', async () => { + const fakePath = "/rendered/path/configuration"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + configuration: "configurationValue", + }; + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.configurationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.configurationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('configurationPath', () => { + const result = client.configurationPath("projectValue", "locationValue", "configurationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.configurationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromConfigurationName', () => { + const result = client.matchProjectFromConfigurationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.configurationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromConfigurationName', () => { + const result = client.matchLocationFromConfigurationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.configurationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchConfigurationFromConfigurationName', () => { + const result = client.matchConfigurationFromConfigurationName(fakePath); + assert.strictEqual(result, "configurationValue"); + assert((client.pathTemplates.configurationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('instance', async () => { + const fakePath = "/rendered/path/instance"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + }; + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.instancePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.instancePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath("projectValue", "locationValue", "instanceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromInstanceName', () => { + const result = client.matchLocationFromInstanceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('location', async () => { + const fakePath = "/rendered/path/location"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + }; + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.locationPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath("projectValue", "locationValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('product', async () => { + const fakePath = "/rendered/path/product"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + product: "productValue", + }; + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.productPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.productPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('productPath', () => { + const result = client.productPath("projectValue", "locationValue", "productValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.productPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProductName', () => { + const result = client.matchProjectFromProductName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.productPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProductName', () => { + const result = client.matchLocationFromProductName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.productPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchProductFromProductName', () => { + const result = client.matchProductFromProductName(fakePath); + assert.strictEqual(result, "productValue"); + assert((client.pathTemplates.productPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('project', async () => { + const fakePath = "/rendered/path/project"; + const expectedParameters = { + project: "projectValue", + }; + const client = new licensemanagerModule.v1.LicenseManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath("projectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-licensemanager/tsconfig.json b/packages/google-cloud-licensemanager/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/google-cloud-licensemanager/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/google-cloud-licensemanager/webpack.config.js b/packages/google-cloud-licensemanager/webpack.config.js new file mode 100644 index 000000000000..8f066e365205 --- /dev/null +++ b/packages/google-cloud-licensemanager/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: 'LicenseManager', + filename: './license-manager.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-cloud-lustre/CHANGELOG.md b/packages/google-cloud-lustre/CHANGELOG.md index 657215921fb9..b7ac7e70c7db 100644 --- a/packages/google-cloud-lustre/CHANGELOG.md +++ b/packages/google-cloud-lustre/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/lustre-v0.1.0...lustre-v0.2.0) (2025-07-17) + + +### Features + +* Add a new instance state UPDATING ([b127b20](https://github.com/googleapis/google-cloud-node/commit/b127b20f0def69757a57519d1cc656e134f37ad6)) + ## 0.1.0 (2025-07-09) diff --git a/packages/google-cloud-lustre/package.json b/packages/google-cloud-lustre/package.json index 54c7832a479b..56c164eae1af 100644 --- a/packages/google-cloud-lustre/package.json +++ b/packages/google-cloud-lustre/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/lustre", - "version": "0.1.0", + "version": "0.2.0", "description": "Google Cloud Managed Lustre API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/instance.proto b/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/instance.proto index ff24df006128..6476d82f5e02 100644 --- a/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/instance.proto +++ b/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/instance.proto @@ -58,6 +58,9 @@ message Instance { // The instance is stopped. STOPPED = 6; + + // The instance is being updated. + UPDATING = 7; } // Identifier. The name of the instance. @@ -72,7 +75,7 @@ message Instance { ]; // Required. The storage capacity of the instance in gibibytes (GiB). Allowed - // values are from `18000` to `936000`, in increments of 9000. + // values are from `18000` to `954000`, in increments of 9000. int64 capacity_gib = 2 [(google.api.field_behavior) = REQUIRED]; // Required. Immutable. The full name of the VPC network to which the instance @@ -105,15 +108,16 @@ message Instance { // Optional. Labels as key value pairs. map labels = 9 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The throughput of the instance in MB/s/TiB. - // Valid values are 250, 500, 1000. - // Default value is 1000. + // Required. The throughput of the instance in MB/s/TiB. + // Valid values are 125, 250, 500, 1000. int64 per_unit_storage_throughput = 11 - [(google.api.field_behavior) = OPTIONAL]; + [(google.api.field_behavior) = REQUIRED]; // Optional. Indicates whether you want to enable support for GKE clients. By - // default, GKE clients are not supported. - bool gke_support_enabled = 12 [(google.api.field_behavior) = OPTIONAL]; + // default, GKE clients are not supported. Deprecated. No longer required for + // GKE instance creation. + bool gke_support_enabled = 12 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; } // Message for requesting list of Instances diff --git a/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/transfer.proto b/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/transfer.proto index 6a80b2cb4724..fc2f32ae992a 100644 --- a/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/transfer.proto +++ b/packages/google-cloud-lustre/protos/google/cloud/lustre/v1/transfer.proto @@ -42,9 +42,11 @@ enum TransferType { // Message for importing data to Lustre. message ImportDataRequest { // A Cloud Storage URI of a folder to import file data from, in the - // form of `gs:///` + // form of `gs:////`. oneof source { // The Cloud Storage source bucket and, optionally, path inside the bucket. + // If a path inside the bucket is specified, it must end with a forward + // slash (`/`). GcsPath gcs_path = 2; } @@ -54,7 +56,8 @@ message ImportDataRequest { LustrePath lustre_path = 3; } - // Required. Name of the resource. + // Required. The name of the Managed Lustre instance in the format + // `projects/{project}/locations/{location}/instances/{instance}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "lustre.googleapis.com/Instance" } @@ -67,7 +70,7 @@ message ImportDataRequest { ]; // Optional. User-specified service account used to perform the transfer. - // If unspecified, the default Lustre P4 service account will be used. + // If unspecified, the default Managed Lustre service agent will be used. string service_account = 5 [ (google.api.field_behavior) = OPTIONAL, (google.api.resource_reference) = { @@ -76,21 +79,26 @@ message ImportDataRequest { ]; } -// Message for exporting data from Lustre. +// Export data from Managed Lustre to a Cloud Storage bucket. message ExportDataRequest { // The source of the data transfer. oneof source { - // Lustre path source. + // The root directory path to the Managed Lustre file system. Must start + // with `/`. Default is `/`. LustrePath lustre_path = 2; } // The destination of the data transfer. oneof destination { - // Cloud Storage destination. + // The URI to a Cloud Storage bucket, or a path within a bucket, using + // the format `gs:////`. If a + // path inside the bucket is specified, it must end with a forward slash + // (`/`). GcsPath gcs_path = 3; } - // Required. Name of the resource. + // Required. The name of the Managed Lustre instance in the format + // `projects/{project}/locations/{location}/instances/{instance}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "lustre.googleapis.com/Instance" } @@ -183,17 +191,21 @@ message ImportDataMetadata { string api_version = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Cloud Storage as the source of a data transfer. +// Specifies a Cloud Storage bucket and, optionally, a path inside the bucket. message GcsPath { - // Required. URI to a Cloud Storage path in the format: - // `gs://`. + // Required. The URI to a Cloud Storage bucket, or a path within a bucket, + // using the format `gs:////`. If a + // path inside the bucket is specified, it must end with a forward slash + // (`/`). string uri = 1 [(google.api.field_behavior) = REQUIRED]; } -// LustrePath represents a path in the Lustre file system. +// The root directory path to the Lustre file system. message LustrePath { - // Optional. Root directory path to the Managed Lustre file system, starting - // with `/`. Defaults to `/` if unset. + // Optional. The root directory path to the Managed Lustre file system. Must + // start with + // `/`. Default is `/`. If you're importing data into Managed Lustre, any + // path other than the default must already exist on the file system. string path = 1 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-lustre/protos/protos.d.ts b/packages/google-cloud-lustre/protos/protos.d.ts index 04623cd5eec0..9819cdf68423 100644 --- a/packages/google-cloud-lustre/protos/protos.d.ts +++ b/packages/google-cloud-lustre/protos/protos.d.ts @@ -199,7 +199,8 @@ export namespace google { DELETING = 3, UPGRADING = 4, REPAIRING = 5, - STOPPED = 6 + STOPPED = 6, + UPDATING = 7 } } @@ -2584,6 +2585,9 @@ export namespace google { /** FieldInfo format */ format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null); + + /** FieldInfo referencedTypes */ + referencedTypes?: (google.api.ITypeReference[]|null); } /** Represents a FieldInfo. */ @@ -2598,6 +2602,9 @@ export namespace google { /** FieldInfo format. */ public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format); + /** FieldInfo referencedTypes. */ + public referencedTypes: google.api.ITypeReference[]; + /** * Creates a new FieldInfo instance using the specified properties. * @param [properties] Properties to set @@ -2688,6 +2695,103 @@ export namespace google { } } + /** Properties of a TypeReference. */ + interface ITypeReference { + + /** TypeReference typeName */ + typeName?: (string|null); + } + + /** Represents a TypeReference. */ + class TypeReference implements ITypeReference { + + /** + * Constructs a new TypeReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ITypeReference); + + /** TypeReference typeName. */ + public typeName: string; + + /** + * Creates a new TypeReference instance using the specified properties. + * @param [properties] Properties to set + * @returns TypeReference instance + */ + public static create(properties?: google.api.ITypeReference): google.api.TypeReference; + + /** + * Encodes the specified TypeReference message. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @param message TypeReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ITypeReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TypeReference message, length delimited. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @param message TypeReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ITypeReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TypeReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TypeReference + * @throws {Error} If the payload is not 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.TypeReference; + + /** + * Decodes a TypeReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TypeReference + * @throws {Error} If the payload 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.TypeReference; + + /** + * Verifies a TypeReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TypeReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TypeReference + */ + public static fromObject(object: { [k: string]: any }): google.api.TypeReference; + + /** + * Creates a plain object from a TypeReference message. Also converts values to other types if specified. + * @param message TypeReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.TypeReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TypeReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TypeReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { @@ -3308,6 +3412,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -3325,6 +3432,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -4025,6 +4135,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -4039,6 +4152,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -4117,6 +4233,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -4443,6 +4671,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -4457,6 +4688,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -4781,6 +5015,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -4897,6 +5234,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -4927,6 +5265,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -4976,6 +5317,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -5110,6 +5454,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -5151,6 +5498,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -5998,6 +6348,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -6024,6 +6377,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -6958,6 +7314,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -7016,6 +7375,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -7236,6 +7598,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -7474,6 +7951,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -7496,6 +7976,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -8088,6 +8571,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -8117,6 +8606,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -8239,6 +8734,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -8358,8 +8963,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -8374,8 +8982,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -8908,6 +9519,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a FieldMask. */ interface IFieldMask { diff --git a/packages/google-cloud-lustre/protos/protos.js b/packages/google-cloud-lustre/protos/protos.js index 603b037fb377..58efa11846fb 100644 --- a/packages/google-cloud-lustre/protos/protos.js +++ b/packages/google-cloud-lustre/protos/protos.js @@ -408,6 +408,7 @@ case 4: case 5: case 6: + case 7: break; } if (message.mountPoint != null && message.hasOwnProperty("mountPoint")) @@ -505,6 +506,10 @@ case 6: message.state = 6; break; + case "UPDATING": + case 7: + message.state = 7; + break; } if (object.mountPoint != null) message.mountPoint = String(object.mountPoint); @@ -651,6 +656,7 @@ * @property {number} UPGRADING=4 UPGRADING value * @property {number} REPAIRING=5 REPAIRING value * @property {number} STOPPED=6 STOPPED value + * @property {number} UPDATING=7 UPDATING value */ Instance.State = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -661,6 +667,7 @@ values[valuesById[4] = "UPGRADING"] = 4; values[valuesById[5] = "REPAIRING"] = 5; values[valuesById[6] = "STOPPED"] = 6; + values[valuesById[7] = "UPDATING"] = 7; return values; })(); @@ -6684,6 +6691,7 @@ * @memberof google.api * @interface IFieldInfo * @property {google.api.FieldInfo.Format|null} [format] FieldInfo format + * @property {Array.|null} [referencedTypes] FieldInfo referencedTypes */ /** @@ -6695,6 +6703,7 @@ * @param {google.api.IFieldInfo=} [properties] Properties to set */ function FieldInfo(properties) { + this.referencedTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6709,6 +6718,14 @@ */ FieldInfo.prototype.format = 0; + /** + * FieldInfo referencedTypes. + * @member {Array.} referencedTypes + * @memberof google.api.FieldInfo + * @instance + */ + FieldInfo.prototype.referencedTypes = $util.emptyArray; + /** * Creates a new FieldInfo instance using the specified properties. * @function create @@ -6735,6 +6752,9 @@ writer = $Writer.create(); if (message.format != null && Object.hasOwnProperty.call(message, "format")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.format); + if (message.referencedTypes != null && message.referencedTypes.length) + for (var i = 0; i < message.referencedTypes.length; ++i) + $root.google.api.TypeReference.encode(message.referencedTypes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -6775,6 +6795,12 @@ message.format = reader.int32(); break; } + case 2: { + if (!(message.referencedTypes && message.referencedTypes.length)) + message.referencedTypes = []; + message.referencedTypes.push($root.google.api.TypeReference.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -6821,6 +6847,15 @@ case 4: break; } + if (message.referencedTypes != null && message.hasOwnProperty("referencedTypes")) { + if (!Array.isArray(message.referencedTypes)) + return "referencedTypes: array expected"; + for (var i = 0; i < message.referencedTypes.length; ++i) { + var error = $root.google.api.TypeReference.verify(message.referencedTypes[i]); + if (error) + return "referencedTypes." + error; + } + } return null; }; @@ -6864,6 +6899,16 @@ message.format = 4; break; } + if (object.referencedTypes) { + if (!Array.isArray(object.referencedTypes)) + throw TypeError(".google.api.FieldInfo.referencedTypes: array expected"); + message.referencedTypes = []; + for (var i = 0; i < object.referencedTypes.length; ++i) { + if (typeof object.referencedTypes[i] !== "object") + throw TypeError(".google.api.FieldInfo.referencedTypes: object expected"); + message.referencedTypes[i] = $root.google.api.TypeReference.fromObject(object.referencedTypes[i]); + } + } return message; }; @@ -6880,10 +6925,17 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.referencedTypes = []; if (options.defaults) object.format = options.enums === String ? "FORMAT_UNSPECIFIED" : 0; if (message.format != null && message.hasOwnProperty("format")) object.format = options.enums === String ? $root.google.api.FieldInfo.Format[message.format] === undefined ? message.format : $root.google.api.FieldInfo.Format[message.format] : message.format; + if (message.referencedTypes && message.referencedTypes.length) { + object.referencedTypes = []; + for (var j = 0; j < message.referencedTypes.length; ++j) + object.referencedTypes[j] = $root.google.api.TypeReference.toObject(message.referencedTypes[j], options); + } return object; }; @@ -6936,6 +6988,211 @@ return FieldInfo; })(); + api.TypeReference = (function() { + + /** + * Properties of a TypeReference. + * @memberof google.api + * @interface ITypeReference + * @property {string|null} [typeName] TypeReference typeName + */ + + /** + * Constructs a new TypeReference. + * @memberof google.api + * @classdesc Represents a TypeReference. + * @implements ITypeReference + * @constructor + * @param {google.api.ITypeReference=} [properties] Properties to set + */ + function TypeReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TypeReference typeName. + * @member {string} typeName + * @memberof google.api.TypeReference + * @instance + */ + TypeReference.prototype.typeName = ""; + + /** + * Creates a new TypeReference instance using the specified properties. + * @function create + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference=} [properties] Properties to set + * @returns {google.api.TypeReference} TypeReference instance + */ + TypeReference.create = function create(properties) { + return new TypeReference(properties); + }; + + /** + * Encodes the specified TypeReference message. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @function encode + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference} message TypeReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.typeName); + return writer; + }; + + /** + * Encodes the specified TypeReference message, length delimited. Does not implicitly {@link google.api.TypeReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.TypeReference + * @static + * @param {google.api.ITypeReference} message TypeReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypeReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.TypeReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.TypeReference} TypeReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.TypeReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.typeName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypeReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.TypeReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.TypeReference} TypeReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypeReference message. + * @function verify + * @memberof google.api.TypeReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TypeReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + return null; + }; + + /** + * Creates a TypeReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.TypeReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.TypeReference} TypeReference + */ + TypeReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.TypeReference) + return object; + var message = new $root.google.api.TypeReference(); + if (object.typeName != null) + message.typeName = String(object.typeName); + return message; + }; + + /** + * Creates a plain object from a TypeReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.TypeReference + * @static + * @param {google.api.TypeReference} message TypeReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TypeReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.typeName = ""; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + return object; + }; + + /** + * Converts this TypeReference to JSON. + * @function toJSON + * @memberof google.api.TypeReference + * @instance + * @returns {Object.} JSON object + */ + TypeReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TypeReference + * @function getTypeUrl + * @memberof google.api.TypeReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TypeReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.TypeReference"; + }; + + return TypeReference; + })(); + api.ResourceDescriptor = (function() { /** @@ -8601,6 +8858,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -8635,6 +8893,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -8667,6 +8933,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -8718,6 +8986,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8769,6 +9041,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -8811,6 +9088,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -8829,8 +9111,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -8838,6 +9122,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -10660,6 +10946,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -10685,6 +10972,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -10711,6 +11006,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -10751,6 +11048,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10791,6 +11092,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -10811,6 +11117,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -10827,10 +11138,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -10860,55 +11175,307 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; - return PythonSettings; - })(); + PythonSettings.ExperimentalFeatures = (function() { - api.NodeSettings = (function() { + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (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 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]]; - } + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; - /** - * 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); - }; + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + + 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 @@ -11736,6 +12303,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -11747,6 +12315,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11761,6 +12330,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -11787,6 +12364,9 @@ 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(); return writer; }; @@ -11817,7 +12397,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -11827,6 +12407,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -11867,6 +12470,14 @@ 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"; + } return null; }; @@ -11887,6 +12498,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -11903,10 +12521,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -12545,34 +13171,279 @@ return values; })(); - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - return api; - })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + return api; + })(); google.protobuf = (function() { @@ -12814,6 +13685,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -12828,6 +13700,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -12852,6 +13725,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -12874,6 +13748,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -12924,6 +13799,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -13045,6 +13928,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -13117,6 +14003,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -13219,6 +14111,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -13273,6 +14172,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -13325,6 +14225,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -13388,6 +14295,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -13453,6 +14364,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -13509,6 +14421,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -13557,6 +14474,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -13662,6 +14580,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -13714,6 +14640,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -13806,6 +14734,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -13919,6 +14851,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -14018,6 +14959,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -14047,6 +15008,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -14092,6 +15054,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -16136,6 +17100,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -16196,6 +17161,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -16233,6 +17206,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -16295,6 +17270,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -16363,6 +17342,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -16412,6 +17400,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -16436,6 +17444,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -16456,6 +17465,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -18774,6 +19785,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior * @property {google.api.IFieldInfo|null} [".google.api.fieldInfo"] FieldOptions .google.api.fieldInfo @@ -18895,6 +19907,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -18977,6 +19997,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -19080,6 +20102,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -19219,6 +20245,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -19412,6 +20443,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -19514,6 +20550,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; object[".google.api.fieldInfo"] = null; } @@ -19547,6 +20584,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -19821,6 +20860,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -19862,103 +20902,589 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; break; case "EDITION_PROTO3": case 999: - message.edition = 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; + })(); + + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; break; case "EDITION_2023": case 1000: - message.edition = 1000; + message.editionRemoved = 1000; break; case "EDITION_2024": case 1001: - message.edition = 1001; + message.editionRemoved = 1001; break; case "EDITION_1_TEST_ONLY": case 1: - message.edition = 1; + message.editionRemoved = 1; break; case "EDITION_2_TEST_ONLY": case 2: - message.edition = 2; + message.editionRemoved = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: - message.edition = 99997; + message.editionRemoved = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: - message.edition = 99998; + message.editionRemoved = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: - message.edition = 99999; + message.editionRemoved = 99999; break; case "EDITION_MAX": case 2147483647: - message.edition = 2147483647; + message.editionRemoved = 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. + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + FeatureSupport.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; + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; /** - * Converts this EditionDefault to JSON. + * Converts this FeatureSupport to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance * @returns {Object.} JSON object */ - EditionDefault.prototype.toJSON = function toJSON() { + FeatureSupport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EditionDefault + * Gets the default type url for FeatureSupport * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; }; - return EditionDefault; + return FeatureSupport; })(); return FieldOptions; @@ -20553,6 +22079,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -20596,6 +22123,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -20634,6 +22169,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -20685,6 +22222,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -20737,6 +22278,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -20770,6 +22316,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -20802,6 +22353,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -20809,6 +22361,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -22276,6 +23830,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -22341,6 +23897,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -22377,6 +23949,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -22437,6 +24013,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -22527,6 +24111,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -22666,6 +24270,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -22689,6 +24341,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -22702,6 +24356,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -22829,6 +24487,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -23013,6 +24884,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -23030,6 +24902,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -23078,6 +24951,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -23130,6 +25007,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -23238,7 +25119,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -23265,12 +25147,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -23296,10 +25186,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -23340,8 +25232,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -23384,6 +25280,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -23396,10 +25293,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -23427,6 +25329,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -23468,10 +25374,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -23490,13 +25401,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -24711,6 +26625,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.FieldMask = (function() { /** diff --git a/packages/google-cloud-lustre/protos/protos.json b/packages/google-cloud-lustre/protos/protos.json index 513b0ed25a60..e1a524bd9faf 100644 --- a/packages/google-cloud-lustre/protos/protos.json +++ b/packages/google-cloud-lustre/protos/protos.json @@ -100,13 +100,14 @@ "type": "int64", "id": 11, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" } }, "gkeSupportEnabled": { "type": "bool", "id": 12, "options": { + "deprecated": true, "(google.api.field_behavior)": "OPTIONAL" } } @@ -120,7 +121,8 @@ "DELETING": 3, "UPGRADING": 4, "REPAIRING": 5, - "STOPPED": 6 + "STOPPED": 6, + "UPDATING": 7 } } } @@ -908,8 +910,7 @@ "java_multiple_files": true, "java_outer_classname": "LaunchStageProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "fieldBehavior": { @@ -944,6 +945,11 @@ "format": { "type": "Format", "id": 1 + }, + "referencedTypes": { + "rule": "repeated", + "type": "TypeReference", + "id": 2 } }, "nested": { @@ -958,6 +964,14 @@ } } }, + "TypeReference": { + "fields": { + "typeName": { + "type": "string", + "id": 1 + } + } + }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -1156,6 +1170,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -1296,6 +1314,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -1353,6 +1393,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -1414,6 +1459,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -1447,12 +1505,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -1491,6 +1556,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -1579,6 +1649,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -1804,6 +1878,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -2018,6 +2096,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -2153,7 +2232,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -2181,6 +2261,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -2250,6 +2334,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -2338,6 +2442,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -2480,6 +2588,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -2490,6 +2599,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -2500,6 +2610,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -2510,6 +2621,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -2520,7 +2632,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -2530,27 +2643,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -2595,7 +2719,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -2610,6 +2740,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -2637,11 +2794,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -2654,6 +2826,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -2739,6 +2917,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "FieldMask": { "fields": { "paths": { @@ -2847,6 +3033,7 @@ "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", "php_namespace": "Google\\LongRunning" }, "nested": { diff --git a/packages/google-cloud-lustre/samples/generated/v1/lustre.export_data.js b/packages/google-cloud-lustre/samples/generated/v1/lustre.export_data.js index 4cce12fb0c4b..88c890145ecb 100644 --- a/packages/google-cloud-lustre/samples/generated/v1/lustre.export_data.js +++ b/packages/google-cloud-lustre/samples/generated/v1/lustre.export_data.js @@ -29,15 +29,20 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Lustre path source. + * The root directory path to the Managed Lustre file system. Must start + * with `/`. Default is `/`. */ // const lustrePath = {} /** - * Cloud Storage destination. + * The URI to a Cloud Storage bucket, or a path within a bucket, using + * the format `gs:////`. If a + * path inside the bucket is specified, it must end with a forward slash + * (`/`). */ // const gcsPath = {} /** - * Required. Name of the resource. + * Required. The name of the Managed Lustre instance in the format + * `projects/{project}/locations/{location}/instances/{instance}`. */ // const name = 'abc123' /** diff --git a/packages/google-cloud-lustre/samples/generated/v1/lustre.import_data.js b/packages/google-cloud-lustre/samples/generated/v1/lustre.import_data.js index f5cd01b6c28e..4d6556b43df2 100644 --- a/packages/google-cloud-lustre/samples/generated/v1/lustre.import_data.js +++ b/packages/google-cloud-lustre/samples/generated/v1/lustre.import_data.js @@ -30,6 +30,8 @@ function main(name) { */ /** * The Cloud Storage source bucket and, optionally, path inside the bucket. + * If a path inside the bucket is specified, it must end with a forward + * slash (`/`). */ // const gcsPath = {} /** @@ -37,7 +39,8 @@ function main(name) { */ // const lustrePath = {} /** - * Required. Name of the resource. + * Required. The name of the Managed Lustre instance in the format + * `projects/{project}/locations/{location}/instances/{instance}`. */ // const name = 'abc123' /** @@ -46,7 +49,7 @@ function main(name) { // const requestId = 'abc123' /** * Optional. User-specified service account used to perform the transfer. - * If unspecified, the default Lustre P4 service account will be used. + * If unspecified, the default Managed Lustre service agent will be used. */ // const serviceAccount = 'abc123' diff --git a/packages/google-cloud-lustre/samples/generated/v1/snippet_metadata_google.cloud.lustre.v1.json b/packages/google-cloud-lustre/samples/generated/v1/snippet_metadata_google.cloud.lustre.v1.json index 026f2daa787c..ad70ad3e0d54 100644 --- a/packages/google-cloud-lustre/samples/generated/v1/snippet_metadata_google.cloud.lustre.v1.json +++ b/packages/google-cloud-lustre/samples/generated/v1/snippet_metadata_google.cloud.lustre.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-lustre", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { @@ -262,7 +262,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -318,7 +318,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 76, "type": "FULL" } ], diff --git a/packages/google-cloud-lustre/samples/package.json b/packages/google-cloud-lustre/samples/package.json index 7d755b4386b9..b9009500ef91 100644 --- a/packages/google-cloud-lustre/samples/package.json +++ b/packages/google-cloud-lustre/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/lustre": "^0.1.0" + "@google-cloud/lustre": "^0.2.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-lustre/src/v1/lustre_client.ts b/packages/google-cloud-lustre/src/v1/lustre_client.ts index 62cdfce858a2..14f4fc60811e 100644 --- a/packages/google-cloud-lustre/src/v1/lustre_client.ts +++ b/packages/google-cloud-lustre/src/v1/lustre_client.ts @@ -18,22 +18,11 @@ /* global window */ import type * as gax from 'google-gax'; -import type { - Callback, - CallOptions, - Descriptors, - ClientOptions, - GrpcClientOptions, - LROperation, - PaginationCallback, - GaxCall, - LocationsClient, - LocationProtos, -} from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, LocationsClient, LocationProtos} from 'google-gax'; import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); -import {loggingUtils as logging} from 'google-gax'; +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; /** * Client JSON configuration object, loaded from @@ -113,41 +102,20 @@ export class LustreClient { * const client = new LustreClient({fallback: true}, gax); * ``` */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback - ) { + constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback) { // Ensure that options include all the required fields. const staticMembers = this.constructor as typeof LustreClient; - if ( - opts?.universe_domain && - opts?.universeDomain && - opts?.universe_domain !== opts?.universeDomain - ) { - throw new Error( - 'Please set either universe_domain or universeDomain, but not both.' - ); + 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'; + 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 = 'lustre.' + this._universeDomain; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!( - opts?.servicePath || opts?.apiEndpoint - ); + 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'); + 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. @@ -173,7 +141,7 @@ export class LustreClient { this._opts = opts; // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + this.auth = (this._gaxGrpc.auth as gax.GoogleAuth); // Set useJWTAccessWithScope on the auth object. this.auth.useJWTAccessWithScope = true; @@ -189,9 +157,13 @@ export class LustreClient { this._gaxGrpc, opts ); + // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + const clientHeader = [ + `gax/${this._gaxModule.version}`, + `gapic/${version}`, + ]; if (typeof process === 'object' && 'versions' in process) { clientHeader.push(`gl-node/${process.versions.node}`); } else { @@ -221,119 +193,71 @@ export class LustreClient { // (e.g. 50 results at a time, with tokens to get subsequent // pages). Denote the keys used for pagination and results. this.descriptors.page = { - listInstances: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'instances' - ), + listInstances: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'instances') }; - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. const lroOptions: GrpcClientOptions = { auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined }; if (opts.fallback) { lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = [ - { - selector: 'google.cloud.location.Locations.GetLocation', - get: '/v1/{name=projects/*/locations/*}', - }, - { - selector: 'google.cloud.location.Locations.ListLocations', - get: '/v1/{name=projects/*}/locations', - }, - { - selector: 'google.longrunning.Operations.CancelOperation', - post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', - }, - { - selector: 'google.longrunning.Operations.DeleteOperation', - delete: '/v1/{name=projects/*/locations/*/operations/*}', - }, - { - selector: 'google.longrunning.Operations.GetOperation', - get: '/v1/{name=projects/*/locations/*/operations/*}', - }, - { - selector: 'google.longrunning.Operations.ListOperations', - get: '/v1/{name=projects/*/locations/*}/operations', - }, - ]; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1/{name=projects/*}/locations',},{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1/{name=projects/*/locations/*/operations/*}:cancel',},{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1/{name=projects/*/locations/*}/operations',}]; } - this.operationsClient = this._gaxModule - .lro(lroOptions) - .operationsClient(opts); + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); const createInstanceResponse = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.Instance' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.Instance') as gax.protobuf.Type; const createInstanceMetadata = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.OperationMetadata' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.OperationMetadata') as gax.protobuf.Type; const updateInstanceResponse = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.Instance' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.Instance') as gax.protobuf.Type; const updateInstanceMetadata = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.OperationMetadata' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.OperationMetadata') as gax.protobuf.Type; const deleteInstanceResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty' - ) as gax.protobuf.Type; + '.google.protobuf.Empty') as gax.protobuf.Type; const deleteInstanceMetadata = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.OperationMetadata' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.OperationMetadata') as gax.protobuf.Type; const importDataResponse = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.ImportDataResponse' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.ImportDataResponse') as gax.protobuf.Type; const importDataMetadata = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.ImportDataMetadata' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.ImportDataMetadata') as gax.protobuf.Type; const exportDataResponse = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.ExportDataResponse' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.ExportDataResponse') as gax.protobuf.Type; const exportDataMetadata = protoFilesRoot.lookup( - '.google.cloud.lustre.v1.ExportDataMetadata' - ) as gax.protobuf.Type; + '.google.cloud.lustre.v1.ExportDataMetadata') as gax.protobuf.Type; this.descriptors.longrunning = { createInstance: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createInstanceResponse.decode.bind(createInstanceResponse), - createInstanceMetadata.decode.bind(createInstanceMetadata) - ), + createInstanceMetadata.decode.bind(createInstanceMetadata)), updateInstance: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateInstanceResponse.decode.bind(updateInstanceResponse), - updateInstanceMetadata.decode.bind(updateInstanceMetadata) - ), + updateInstanceMetadata.decode.bind(updateInstanceMetadata)), deleteInstance: new this._gaxModule.LongrunningDescriptor( this.operationsClient, deleteInstanceResponse.decode.bind(deleteInstanceResponse), - deleteInstanceMetadata.decode.bind(deleteInstanceMetadata) - ), + deleteInstanceMetadata.decode.bind(deleteInstanceMetadata)), importData: new this._gaxModule.LongrunningDescriptor( this.operationsClient, importDataResponse.decode.bind(importDataResponse), - importDataMetadata.decode.bind(importDataMetadata) - ), + importDataMetadata.decode.bind(importDataMetadata)), exportData: new this._gaxModule.LongrunningDescriptor( this.operationsClient, exportDataResponse.decode.bind(exportDataResponse), - exportDataMetadata.decode.bind(exportDataMetadata) - ), + exportDataMetadata.decode.bind(exportDataMetadata)) }; // Put together the default options sent with requests. this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.lustre.v1.Lustre', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - {'x-goog-api-client': clientHeader.join(' ')} - ); + 'google.cloud.lustre.v1.Lustre', 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 @@ -364,41 +288,28 @@ export class LustreClient { // Put together the "service stub" for // google.cloud.lustre.v1.Lustre. this.lustreStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.lustre.v1.Lustre' - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.lustre.v1.Lustre') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.lustre.v1.Lustre, - this._opts, - this._providedCustomServicePath - ) as Promise<{[method: string]: Function}>; + 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 lustreStubMethods = [ - 'listInstances', - 'getInstance', - 'createInstance', - 'updateInstance', - 'deleteInstance', - 'importData', - 'exportData', - ]; + const lustreStubMethods = + ['listInstances', 'getInstance', 'createInstance', 'updateInstance', 'deleteInstance', 'importData', 'exportData']; for (const methodName of lustreStubMethods) { const callPromise = this.lustreStub.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) => () => { + 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] || @@ -423,14 +334,8 @@ export class LustreClient { * @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' - ); + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning'); } return 'lustre.googleapis.com'; } @@ -441,14 +346,8 @@ export class LustreClient { * @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' - ); + if (typeof process === 'object' && typeof process.emitWarning === 'function') { + process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning'); } return 'lustre.googleapis.com'; } @@ -479,7 +378,9 @@ export class LustreClient { * @returns {string[]} List of default scopes. */ static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; + return [ + 'https://www.googleapis.com/auth/cloud-platform' + ]; } getProjectId(): Promise; @@ -488,9 +389,8 @@ export class LustreClient { * 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 { + getProjectId(callback?: Callback): + Promise|void { if (callback) { this.auth.getProjectId(callback); return; @@ -501,1151 +401,816 @@ export class LustreClient { // ------------------- // -- Service calls -- // ------------------- - /** - * Gets details of a single instance. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The instance resource name, in the format - * `projects/{projectId}/locations/{location}/instances/{instanceId}`. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.lustre.v1.Instance|Instance}. - * 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/lustre.get_instance.js - * region_tag:lustre_v1_generated_Lustre_GetInstance_async - */ +/** + * Gets details of a single instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The instance resource name, in the format + * `projects/{projectId}/locations/{location}/instances/{instanceId}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.lustre.v1.Instance|Instance}. + * 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/lustre.get_instance.js + * region_tag:lustre_v1_generated_Lustre_GetInstance_async + */ getInstance( - request?: protos.google.cloud.lustre.v1.IGetInstanceRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | undefined, - {} | undefined, - ] - >; + request?: protos.google.cloud.lustre.v1.IGetInstanceRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.lustre.v1.IInstance, + protos.google.cloud.lustre.v1.IGetInstanceRequest|undefined, {}|undefined + ]>; getInstance( - request: protos.google.cloud.lustre.v1.IGetInstanceRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IGetInstanceRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.lustre.v1.IInstance, + protos.google.cloud.lustre.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>): void; getInstance( - request: protos.google.cloud.lustre.v1.IGetInstanceRequest, - callback: Callback< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IGetInstanceRequest, + callback: Callback< + protos.google.cloud.lustre.v1.IInstance, + protos.google.cloud.lustre.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>): void; getInstance( - request?: protos.google.cloud.lustre.v1.IGetInstanceRequest, - optionsOrCallback?: - | CallOptions - | Callback< + request?: protos.google.cloud.lustre.v1.IGetInstanceRequest, + optionsOrCallback?: CallOptions|Callback< protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, - {} | null | undefined - > - ): Promise< - [ - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | undefined, - {} | undefined, - ] - > | void { + protos.google.cloud.lustre.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.lustre.v1.IInstance, + protos.google.cloud.lustre.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.lustre.v1.IInstance, + protos.google.cloud.lustre.v1.IGetInstanceRequest|undefined, {}|undefined + ]>|void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch(err => { - throw err; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', }); + this.initialize().catch(err => {throw err}); this._log.info('getInstance request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | null | undefined, - {} | null | undefined - > - | undefined = callback + const wrappedCallback: Callback< + protos.google.cloud.lustre.v1.IInstance, + protos.google.cloud.lustre.v1.IGetInstanceRequest|null|undefined, + {}|null|undefined>|undefined = callback ? (error, response, options, rawResponse) => { this._log.info('getInstance response %j', response); callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - return this.innerApiCalls - .getInstance(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IGetInstanceRequest | undefined, - {} | undefined, - ]) => { - this._log.info('getInstance response %j', response); - return [response, options, rawResponse]; + return this.innerApiCalls.getInstance(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.lustre.v1.IInstance, + protos.google.cloud.lustre.v1.IGetInstanceRequest|undefined, + {}|undefined + ]) => { + this._log.info('getInstance response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); } - ); + throw error; + }); } - /** - * Creates a new instance in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The instance's project and location, in the format - * `projects/{project}/locations/{location}`. Locations map to Google Cloud - * zones; for example, `us-west1-b`. - * @param {string} request.instanceId - * Required. The name of the Managed Lustre instance. - * - * * Must contain only lowercase letters, numbers, and hyphens. - * * Must start with a letter. - * * Must be between 1-63 characters. - * * Must end with a number or a letter. - * @param {google.cloud.lustre.v1.Instance} request.instance - * Required. The resource being created - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/lustre.create_instance.js - * region_tag:lustre_v1_generated_Lustre_CreateInstance_async - */ +/** + * Creates a new instance in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The instance's project and location, in the format + * `projects/{project}/locations/{location}`. Locations map to Google Cloud + * zones; for example, `us-west1-b`. + * @param {string} request.instanceId + * Required. The name of the Managed Lustre instance. + * + * * Must contain only lowercase letters, numbers, and hyphens. + * * Must start with a letter. + * * Must be between 1-63 characters. + * * Must end with a number or a letter. + * @param {google.cloud.lustre.v1.Instance} request.instance + * Required. The resource being created + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/lustre.create_instance.js + * region_tag:lustre_v1_generated_Lustre_CreateInstance_async + */ createInstance( - request?: protos.google.cloud.lustre.v1.ICreateInstanceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; + request?: protos.google.cloud.lustre.v1.ICreateInstanceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; createInstance( - request: protos.google.cloud.lustre.v1.ICreateInstanceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.ICreateInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; createInstance( - request: protos.google.cloud.lustre.v1.ICreateInstanceRequest, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.ICreateInstanceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; createInstance( - request?: protos.google.cloud.lustre.v1.ICreateInstanceRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - > | void { + request?: protos.google.cloud.lustre.v1.ICreateInstanceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch(err => { - throw err; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', }); - const wrappedCallback: - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - | undefined = callback + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback ? (error, response, rawResponse, _) => { this._log.info('createInstance response %j', rawResponse); callback!(error, response, rawResponse, _); // We verified callback above. } : undefined; this._log.info('createInstance request %j', request); - return this.innerApiCalls - .createInstance(request, options, wrappedCallback) - ?.then( - ([response, rawResponse, _]: [ - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ]) => { - this._log.info('createInstance response %j', rawResponse); - return [response, rawResponse, _]; - } - ); + return this.innerApiCalls.createInstance(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createInstance response %j', rawResponse); + return [response, rawResponse, _]; + }); } - /** - * Check the status of the long running operation returned by `createInstance()`. - * @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/lustre.create_instance.js - * region_tag:lustre_v1_generated_Lustre_CreateInstance_async - */ - async checkCreateInstanceProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.lustre.v1.Instance, - protos.google.cloud.lustre.v1.OperationMetadata - > - > { +/** + * Check the status of the long running operation returned by `createInstance()`. + * @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/lustre.create_instance.js + * region_tag:lustre_v1_generated_Lustre_CreateInstance_async + */ + async checkCreateInstanceProgress(name: string): Promise>{ this._log.info('createInstance long-running'); - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + 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.createInstance, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.lustre.v1.Instance, - protos.google.cloud.lustre.v1.OperationMetadata - >; + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createInstance, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; } - /** - * Updates the parameters of a single instance. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.protobuf.FieldMask} [request.updateMask] - * Optional. Specifies the fields to be overwritten in the instance resource - * by the update. - * - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If no - * mask is provided then all fields present in the request are - * overwritten. - * @param {google.cloud.lustre.v1.Instance} request.instance - * Required. The resource name of the instance to update, in the format - * `projects/{projectId}/locations/{location}/instances/{instanceId}`. - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/lustre.update_instance.js - * region_tag:lustre_v1_generated_Lustre_UpdateInstance_async - */ +/** + * Updates the parameters of a single instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Specifies the fields to be overwritten in the instance resource + * by the update. + * + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If no + * mask is provided then all fields present in the request are + * overwritten. + * @param {google.cloud.lustre.v1.Instance} request.instance + * Required. The resource name of the instance to update, in the format + * `projects/{projectId}/locations/{location}/instances/{instanceId}`. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/lustre.update_instance.js + * region_tag:lustre_v1_generated_Lustre_UpdateInstance_async + */ updateInstance( - request?: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; + request?: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; updateInstance( - request: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; updateInstance( - request: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; updateInstance( - request?: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - > | void { + request?: protos.google.cloud.lustre.v1.IUpdateInstanceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - 'instance.name': request.instance!.name ?? '', - }); - this.initialize().catch(err => { - throw err; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'instance.name': request.instance!.name ?? '', }); - const wrappedCallback: - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - | undefined = callback + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback ? (error, response, rawResponse, _) => { this._log.info('updateInstance response %j', rawResponse); callback!(error, response, rawResponse, _); // We verified callback above. } : undefined; this._log.info('updateInstance request %j', request); - return this.innerApiCalls - .updateInstance(request, options, wrappedCallback) - ?.then( - ([response, rawResponse, _]: [ - LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ]) => { - this._log.info('updateInstance response %j', rawResponse); - return [response, rawResponse, _]; - } - ); + return this.innerApiCalls.updateInstance(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateInstance response %j', rawResponse); + return [response, rawResponse, _]; + }); } - /** - * Check the status of the long running operation returned by `updateInstance()`. - * @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/lustre.update_instance.js - * region_tag:lustre_v1_generated_Lustre_UpdateInstance_async - */ - async checkUpdateInstanceProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.lustre.v1.Instance, - protos.google.cloud.lustre.v1.OperationMetadata - > - > { +/** + * Check the status of the long running operation returned by `updateInstance()`. + * @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/lustre.update_instance.js + * region_tag:lustre_v1_generated_Lustre_UpdateInstance_async + */ + async checkUpdateInstanceProgress(name: string): Promise>{ this._log.info('updateInstance long-running'); - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + 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.updateInstance, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.lustre.v1.Instance, - protos.google.cloud.lustre.v1.OperationMetadata - >; + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateInstance, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; } - /** - * Deletes a single instance. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the instance to delete, in the format - * `projects/{projectId}/locations/{location}/instances/{instanceId}`. - * @param {string} [request.requestId] - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/lustre.delete_instance.js - * region_tag:lustre_v1_generated_Lustre_DeleteInstance_async - */ +/** + * Deletes a single instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the instance to delete, in the format + * `projects/{projectId}/locations/{location}/instances/{instanceId}`. + * @param {string} [request.requestId] + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/lustre.delete_instance.js + * region_tag:lustre_v1_generated_Lustre_DeleteInstance_async + */ deleteInstance( - request?: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; + request?: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; deleteInstance( - request: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; deleteInstance( - request: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; deleteInstance( - request?: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - > | void { + request?: protos.google.cloud.lustre.v1.IDeleteInstanceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch(err => { - throw err; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', }); - const wrappedCallback: - | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - | undefined = callback + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback ? (error, response, rawResponse, _) => { this._log.info('deleteInstance response %j', rawResponse); callback!(error, response, rawResponse, _); // We verified callback above. } : undefined; this._log.info('deleteInstance request %j', request); - return this.innerApiCalls - .deleteInstance(request, options, wrappedCallback) - ?.then( - ([response, rawResponse, _]: [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ]) => { - this._log.info('deleteInstance response %j', rawResponse); - return [response, rawResponse, _]; - } - ); + return this.innerApiCalls.deleteInstance(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteInstance response %j', rawResponse); + return [response, rawResponse, _]; + }); } - /** - * Check the status of the long running operation returned by `deleteInstance()`. - * @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/lustre.delete_instance.js - * region_tag:lustre_v1_generated_Lustre_DeleteInstance_async - */ - async checkDeleteInstanceProgress( - name: string - ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.lustre.v1.OperationMetadata - > - > { +/** + * Check the status of the long running operation returned by `deleteInstance()`. + * @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/lustre.delete_instance.js + * region_tag:lustre_v1_generated_Lustre_DeleteInstance_async + */ + async checkDeleteInstanceProgress(name: string): Promise>{ this._log.info('deleteInstance long-running'); - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + 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.deleteInstance, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.lustre.v1.OperationMetadata - >; + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteInstance, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; } - /** - * Imports data from Cloud Storage to a Managed Lustre instance. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.lustre.v1.GcsPath} request.gcsPath - * The Cloud Storage source bucket and, optionally, path inside the bucket. - * @param {google.cloud.lustre.v1.LustrePath} request.lustrePath - * Lustre path destination. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. UUID to identify requests. - * @param {string} [request.serviceAccount] - * Optional. User-specified service account used to perform the transfer. - * If unspecified, the default Lustre P4 service account will be used. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * 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/lustre.import_data.js - * region_tag:lustre_v1_generated_Lustre_ImportData_async - */ +/** + * Imports data from Cloud Storage to a Managed Lustre instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.lustre.v1.GcsPath} request.gcsPath + * The Cloud Storage source bucket and, optionally, path inside the bucket. + * If a path inside the bucket is specified, it must end with a forward + * slash (`/`). + * @param {google.cloud.lustre.v1.LustrePath} request.lustrePath + * Lustre path destination. + * @param {string} request.name + * Required. The name of the Managed Lustre instance in the format + * `projects/{project}/locations/{location}/instances/{instance}`. + * @param {string} [request.requestId] + * Optional. UUID to identify requests. + * @param {string} [request.serviceAccount] + * Optional. User-specified service account used to perform the transfer. + * If unspecified, the default Managed Lustre service agent will be used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * 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/lustre.import_data.js + * region_tag:lustre_v1_generated_Lustre_ImportData_async + */ importData( - request?: protos.google.cloud.lustre.v1.IImportDataRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; + request?: protos.google.cloud.lustre.v1.IImportDataRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; importData( - request: protos.google.cloud.lustre.v1.IImportDataRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IImportDataRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; importData( - request: protos.google.cloud.lustre.v1.IImportDataRequest, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IImportDataRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; importData( - request?: protos.google.cloud.lustre.v1.IImportDataRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - > | void { + request?: protos.google.cloud.lustre.v1.IImportDataRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch(err => { - throw err; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', }); - const wrappedCallback: - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - | undefined = callback + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback ? (error, response, rawResponse, _) => { this._log.info('importData response %j', rawResponse); callback!(error, response, rawResponse, _); // We verified callback above. } : undefined; this._log.info('importData request %j', request); - return this.innerApiCalls - .importData(request, options, wrappedCallback) - ?.then( - ([response, rawResponse, _]: [ - LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ]) => { - this._log.info('importData response %j', rawResponse); - return [response, rawResponse, _]; - } - ); + return this.innerApiCalls.importData(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('importData response %j', rawResponse); + return [response, rawResponse, _]; + }); } - /** - * Check the status of the long running operation returned by `importData()`. - * @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/lustre.import_data.js - * region_tag:lustre_v1_generated_Lustre_ImportData_async - */ - async checkImportDataProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.lustre.v1.ImportDataResponse, - protos.google.cloud.lustre.v1.ImportDataMetadata - > - > { +/** + * Check the status of the long running operation returned by `importData()`. + * @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/lustre.import_data.js + * region_tag:lustre_v1_generated_Lustre_ImportData_async + */ + async checkImportDataProgress(name: string): Promise>{ this._log.info('importData long-running'); - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + 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.importData, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.lustre.v1.ImportDataResponse, - protos.google.cloud.lustre.v1.ImportDataMetadata - >; + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.importData, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; } - /** - * Exports data from a Managed Lustre instance to Cloud Storage. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.lustre.v1.LustrePath} request.lustrePath - * Lustre path source. - * @param {google.cloud.lustre.v1.GcsPath} request.gcsPath - * Cloud Storage destination. - * @param {string} request.name - * Required. Name of the resource. - * @param {string} [request.requestId] - * Optional. UUID to identify requests. - * @param {string} [request.serviceAccount] - * Optional. User-specified service account used to perform the transfer. - * If unspecified, the Managed Lustre service agent is used. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * 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/lustre.export_data.js - * region_tag:lustre_v1_generated_Lustre_ExportData_async - */ +/** + * Exports data from a Managed Lustre instance to Cloud Storage. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.lustre.v1.LustrePath} request.lustrePath + * The root directory path to the Managed Lustre file system. Must start + * with `/`. Default is `/`. + * @param {google.cloud.lustre.v1.GcsPath} request.gcsPath + * The URI to a Cloud Storage bucket, or a path within a bucket, using + * the format `gs:////`. If a + * path inside the bucket is specified, it must end with a forward slash + * (`/`). + * @param {string} request.name + * Required. The name of the Managed Lustre instance in the format + * `projects/{project}/locations/{location}/instances/{instance}`. + * @param {string} [request.requestId] + * Optional. UUID to identify requests. + * @param {string} [request.serviceAccount] + * Optional. User-specified service account used to perform the transfer. + * If unspecified, the Managed Lustre service agent is used. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * 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/lustre.export_data.js + * region_tag:lustre_v1_generated_Lustre_ExportData_async + */ exportData( - request?: protos.google.cloud.lustre.v1.IExportDataRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - >; + request?: protos.google.cloud.lustre.v1.IExportDataRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; exportData( - request: protos.google.cloud.lustre.v1.IExportDataRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IExportDataRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; exportData( - request: protos.google.cloud.lustre.v1.IExportDataRequest, - callback: Callback< - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + request: protos.google.cloud.lustre.v1.IExportDataRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; exportData( - request?: protos.google.cloud.lustre.v1.IExportDataRequest, - optionsOrCallback?: - | CallOptions - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ] - > | void { + request?: protos.google.cloud.lustre.v1.IExportDataRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch(err => { - throw err; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', }); - const wrappedCallback: - | Callback< - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - | undefined = callback + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback ? (error, response, rawResponse, _) => { this._log.info('exportData response %j', rawResponse); callback!(error, response, rawResponse, _); // We verified callback above. } : undefined; this._log.info('exportData request %j', request); - return this.innerApiCalls - .exportData(request, options, wrappedCallback) - ?.then( - ([response, rawResponse, _]: [ - LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined, - ]) => { - this._log.info('exportData response %j', rawResponse); - return [response, rawResponse, _]; - } - ); + return this.innerApiCalls.exportData(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('exportData response %j', rawResponse); + return [response, rawResponse, _]; + }); } - /** - * Check the status of the long running operation returned by `exportData()`. - * @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/lustre.export_data.js - * region_tag:lustre_v1_generated_Lustre_ExportData_async - */ - async checkExportDataProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.lustre.v1.ExportDataResponse, - protos.google.cloud.lustre.v1.ExportDataMetadata - > - > { +/** + * Check the status of the long running operation returned by `exportData()`. + * @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/lustre.export_data.js + * region_tag:lustre_v1_generated_Lustre_ExportData_async + */ + async checkExportDataProgress(name: string): Promise>{ this._log.info('exportData long-running'); - const request = - new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + 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.exportData, - this._gaxModule.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.lustre.v1.ExportDataResponse, - protos.google.cloud.lustre.v1.ExportDataMetadata - >; + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.exportData, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; } - /** - * Lists instances in a given project and location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve a list of - * instances, in the format `projects/{projectId}/locations/{location}`. - * - * To retrieve instance information for all locations, use "-" as the value - * of `{location}`. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server might return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Desired order of results. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.lustre.v1.Instance|Instance}. - * 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 `listInstancesAsync()` - * 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. - */ + /** + * Lists instances in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve a list of + * instances, in the format `projects/{projectId}/locations/{location}`. + * + * To retrieve instance information for all locations, use "-" as the value + * of `{location}`. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server might return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Desired order of results. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.lustre.v1.Instance|Instance}. + * 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 `listInstancesAsync()` + * 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. + */ listInstances( - request?: protos.google.cloud.lustre.v1.IListInstancesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.lustre.v1.IInstance[], - protos.google.cloud.lustre.v1.IListInstancesRequest | null, - protos.google.cloud.lustre.v1.IListInstancesResponse, - ] - >; + request?: protos.google.cloud.lustre.v1.IListInstancesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.lustre.v1.IInstance[], + protos.google.cloud.lustre.v1.IListInstancesRequest|null, + protos.google.cloud.lustre.v1.IListInstancesResponse + ]>; listInstances( - request: protos.google.cloud.lustre.v1.IListInstancesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.lustre.v1.IListInstancesRequest, - protos.google.cloud.lustre.v1.IListInstancesResponse | null | undefined, - protos.google.cloud.lustre.v1.IInstance - > - ): void; + request: protos.google.cloud.lustre.v1.IListInstancesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.lustre.v1.IListInstancesRequest, + protos.google.cloud.lustre.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.lustre.v1.IInstance>): void; listInstances( - request: protos.google.cloud.lustre.v1.IListInstancesRequest, - callback: PaginationCallback< - protos.google.cloud.lustre.v1.IListInstancesRequest, - protos.google.cloud.lustre.v1.IListInstancesResponse | null | undefined, - protos.google.cloud.lustre.v1.IInstance - > - ): void; + request: protos.google.cloud.lustre.v1.IListInstancesRequest, + callback: PaginationCallback< + protos.google.cloud.lustre.v1.IListInstancesRequest, + protos.google.cloud.lustre.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.lustre.v1.IInstance>): void; listInstances( - request?: protos.google.cloud.lustre.v1.IListInstancesRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< + request?: protos.google.cloud.lustre.v1.IListInstancesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< protos.google.cloud.lustre.v1.IListInstancesRequest, - | protos.google.cloud.lustre.v1.IListInstancesResponse - | null - | undefined, - protos.google.cloud.lustre.v1.IInstance - >, - callback?: PaginationCallback< - protos.google.cloud.lustre.v1.IListInstancesRequest, - protos.google.cloud.lustre.v1.IListInstancesResponse | null | undefined, - protos.google.cloud.lustre.v1.IInstance - > - ): Promise< - [ - protos.google.cloud.lustre.v1.IInstance[], - protos.google.cloud.lustre.v1.IListInstancesRequest | null, - protos.google.cloud.lustre.v1.IListInstancesResponse, - ] - > | void { + protos.google.cloud.lustre.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.lustre.v1.IInstance>, + callback?: PaginationCallback< + protos.google.cloud.lustre.v1.IListInstancesRequest, + protos.google.cloud.lustre.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.lustre.v1.IInstance>): + Promise<[ + protos.google.cloud.lustre.v1.IInstance[], + protos.google.cloud.lustre.v1.IListInstancesRequest|null, + protos.google.cloud.lustre.v1.IListInstancesResponse + ]>|void { request = request || {}; let options: CallOptions; if (typeof optionsOrCallback === 'function' && callback === undefined) { callback = optionsOrCallback; options = {}; - } else { + } + else { options = optionsOrCallback as CallOptions; } options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch(err => { - throw err; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', }); - const wrappedCallback: - | PaginationCallback< - protos.google.cloud.lustre.v1.IListInstancesRequest, - | protos.google.cloud.lustre.v1.IListInstancesResponse - | null - | undefined, - protos.google.cloud.lustre.v1.IInstance - > - | undefined = callback + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.lustre.v1.IListInstancesRequest, + protos.google.cloud.lustre.v1.IListInstancesResponse|null|undefined, + protos.google.cloud.lustre.v1.IInstance>|undefined = callback ? (error, values, nextPageRequest, rawResponse) => { this._log.info('listInstances values %j', values); callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. @@ -1654,65 +1219,62 @@ export class LustreClient { this._log.info('listInstances request %j', request); return this.innerApiCalls .listInstances(request, options, wrappedCallback) - ?.then( - ([response, input, output]: [ - protos.google.cloud.lustre.v1.IInstance[], - protos.google.cloud.lustre.v1.IListInstancesRequest | null, - protos.google.cloud.lustre.v1.IListInstancesResponse, - ]) => { - this._log.info('listInstances values %j', response); - return [response, input, output]; - } - ); + ?.then(([response, input, output]: [ + protos.google.cloud.lustre.v1.IInstance[], + protos.google.cloud.lustre.v1.IListInstancesRequest|null, + protos.google.cloud.lustre.v1.IListInstancesResponse + ]) => { + this._log.info('listInstances values %j', response); + return [response, input, output]; + }); } - /** - * Equivalent to `listInstances`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location for which to retrieve a list of - * instances, in the format `projects/{projectId}/locations/{location}`. - * - * To retrieve instance information for all locations, use "-" as the value - * of `{location}`. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server might return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Desired order of results. - * @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.lustre.v1.Instance|Instance} 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 `listInstancesAsync()` - * 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. - */ +/** + * Equivalent to `listInstances`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location for which to retrieve a list of + * instances, in the format `projects/{projectId}/locations/{location}`. + * + * To retrieve instance information for all locations, use "-" as the value + * of `{location}`. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server might return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Desired order of results. + * @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.lustre.v1.Instance|Instance} 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 `listInstancesAsync()` + * 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. + */ listInstancesStream( - request?: protos.google.cloud.lustre.v1.IListInstancesRequest, - options?: CallOptions - ): Transform { + request?: protos.google.cloud.lustre.v1.IListInstancesRequest, + 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 ?? '', - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => { - throw err; - }); + this.initialize().catch(err => {throw err}); this._log.info('listInstances stream %j', request); return this.descriptors.page.listInstances.createStream( this.innerApiCalls.listInstances as GaxCall, @@ -1721,56 +1283,55 @@ export class LustreClient { ); } - /** - * Equivalent to `listInstances`, 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 project and location for which to retrieve a list of - * instances, in the format `projects/{projectId}/locations/{location}`. - * - * To retrieve instance information for all locations, use "-" as the value - * of `{location}`. - * @param {number} [request.pageSize] - * Optional. Requested page size. Server might return fewer items than - * requested. If unspecified, the server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. A token identifying a page of results the server should return. - * @param {string} [request.filter] - * Optional. Filtering results. - * @param {string} [request.orderBy] - * Optional. Desired order of results. - * @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.lustre.v1.Instance|Instance}. 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/lustre.list_instances.js - * region_tag:lustre_v1_generated_Lustre_ListInstances_async - */ +/** + * Equivalent to `listInstances`, 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 project and location for which to retrieve a list of + * instances, in the format `projects/{projectId}/locations/{location}`. + * + * To retrieve instance information for all locations, use "-" as the value + * of `{location}`. + * @param {number} [request.pageSize] + * Optional. Requested page size. Server might return fewer items than + * requested. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. A token identifying a page of results the server should return. + * @param {string} [request.filter] + * Optional. Filtering results. + * @param {string} [request.orderBy] + * Optional. Desired order of results. + * @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.lustre.v1.Instance|Instance}. 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/lustre.list_instances.js + * region_tag:lustre_v1_generated_Lustre_ListInstances_async + */ listInstancesAsync( - request?: protos.google.cloud.lustre.v1.IListInstancesRequest, - options?: CallOptions - ): AsyncIterable { + request?: protos.google.cloud.lustre.v1.IListInstancesRequest, + 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 ?? '', - }); + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); const defaultCallSettings = this._defaults['listInstances']; const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => { - throw err; - }); + this.initialize().catch(err => {throw err}); this._log.info('listInstances iterate %j', request); return this.descriptors.page.listInstances.asyncIterate( this.innerApiCalls['listInstances'] as GaxCall, @@ -1778,7 +1339,7 @@ export class LustreClient { callSettings ) as AsyncIterable; } - /** +/** * Gets information about a location. * * @param {Object} request @@ -1818,7 +1379,7 @@ export class LustreClient { return this.locationsClient.getLocation(request, options, callback); } - /** +/** * Lists information about the supported locations for this service. Returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. @@ -1856,7 +1417,7 @@ export class LustreClient { return this.locationsClient.listLocationsAsync(request, options); } - /** +/** * Gets the latest state of a long-running operation. Clients can use this * method to poll the operation result at intervals as recommended by the API * service. @@ -1901,20 +1462,20 @@ export class LustreClient { {} | null | undefined > ): Promise<[protos.google.longrunning.Operation]> { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); return this.operationsClient.getOperation(request, options, callback); } /** @@ -1951,13 +1512,13 @@ export class LustreClient { request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions ): AsyncIterable { - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); return this.operationsClient.listOperationsAsync(request, options); } /** @@ -1991,7 +1552,7 @@ export class LustreClient { * await client.cancelOperation({name: ''}); * ``` */ - cancelOperation( + cancelOperation( request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: | gax.CallOptions @@ -2006,20 +1567,20 @@ export class LustreClient { {} | undefined | null > ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); return this.operationsClient.cancelOperation(request, options, callback); } @@ -2063,20 +1624,20 @@ export class LustreClient { {} | null | undefined > ): Promise { - let options: gax.CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as gax.CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); return this.operationsClient.deleteOperation(request, options, callback); } @@ -2092,7 +1653,7 @@ export class LustreClient { * @param {string} instance * @returns {string} Resource name string. */ - instancePath(project: string, location: string, instance: string) { + instancePath(project:string,location:string,instance:string) { return this.pathTemplates.instancePathTemplate.render({ project: project, location: location, @@ -2145,10 +1706,10 @@ export class LustreClient { this._log.info('ending gRPC channel'); this._terminated = true; stub.close(); - this.locationsClient.close(); - this.operationsClient.close(); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); }); } return Promise.resolve(); } -} +} \ No newline at end of file diff --git a/packages/google-cloud-lustre/system-test/fixtures/sample/src/index.js b/packages/google-cloud-lustre/system-test/fixtures/sample/src/index.js index a1946e359ae0..a25673e3259c 100644 --- a/packages/google-cloud-lustre/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-lustre/system-test/fixtures/sample/src/index.js @@ -16,6 +16,7 @@ // ** 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 lustre = require('@google-cloud/lustre'); diff --git a/packages/google-cloud-lustre/system-test/install.ts b/packages/google-cloud-lustre/system-test/install.ts index d927b34361d3..2a505d6df0c5 100644 --- a/packages/google-cloud-lustre/system-test/install.ts +++ b/packages/google-cloud-lustre/system-test/install.ts @@ -21,31 +21,29 @@ import {readFileSync} from 'fs'; import {describe, it} from 'mocha'; describe('📦 pack-n-play test', () => { - it('TypeScript code', async function () { + + 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(), - }, + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } }; await packNTest(options); }); - it('JavaScript code', async function () { + 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(), - }, + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } }; await packNTest(options); }); + }); diff --git a/packages/google-cloud-lustre/test/gapic_lustre_v1.ts b/packages/google-cloud-lustre/test/gapic_lustre_v1.ts index 6fe3d14c5abb..dbe65547163e 100644 --- a/packages/google-cloud-lustre/test/gapic_lustre_v1.ts +++ b/packages/google-cloud-lustre/test/gapic_lustre_v1.ts @@ -25,2284 +25,1850 @@ import * as lustreModule from '../src'; import {PassThrough} from 'stream'; -import { - protobuf, - LROperation, - operationsProtos, - LocationProtos, -} from 'google-gax'; +import {protobuf, LROperation, operationsProtos, LocationProtos} 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(); +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; + 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; + 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]); + 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 stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); } -function stubLongRunningCall( - response?: ResponseType, - callError?: Error, - lroError?: Error -) { - const innerStub = lroError - ? sinon.stub().rejects(lroError) - : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError - ? sinon.stub().rejects(callError) - : sinon.stub().resolves([mockOperation]); +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); } -function stubLongRunningCallWithCallback( - response?: ResponseType, - callError?: Error, - lroError?: Error -) { - const innerStub = lroError - ? sinon.stub().rejects(lroError) - : sinon.stub().resolves([response]); - const mockOperation = { - promise: innerStub, - }; - return callError - ? sinon.stub().callsArgWith(2, callError) - : sinon.stub().callsArgWith(2, null, mockOperation); +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); } -function stubPageStreamingCall( - responses?: ResponseType[], - error?: Error -) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); +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({}); - }); + 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(); }); } - setImmediate(() => { - mockStream.end(); - }); - } else { - setImmediate(() => { - mockStream.write({}); - }); - setImmediate(() => { - mockStream.end(); - }); - } - return sinon.stub().returns(mockStream); + 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); +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.LustreClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new lustreModule.v1.LustreClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'lustre.googleapis.com'); - }); + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new lustreModule.v1.LustreClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'lustre.googleapis.com'); + }); - it('has universeDomain', () => { - const client = new lustreModule.v1.LustreClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, 'googleapis.com'); - }); + it('has universeDomain', () => { + const client = new lustreModule.v1.LustreClient(); + 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 = lustreModule.v1.LustreClient.servicePath; - assert.strictEqual(servicePath, 'lustre.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = lustreModule.v1.LustreClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'lustre.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new lustreModule.v1.LustreClient({ - universeDomain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'lustre.example.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 = lustreModule.v1.LustreClient.servicePath; + assert.strictEqual(servicePath, 'lustre.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = lustreModule.v1.LustreClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'lustre.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new lustreModule.v1.LustreClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'lustre.example.com'); + }); - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new lustreModule.v1.LustreClient({ - universe_domain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'lustre.example.com'); - }); + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new lustreModule.v1.LustreClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'lustre.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 lustreModule.v1.LustreClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'lustre.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 lustreModule.v1.LustreClient({ - universeDomain: 'configured.example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'lustre.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 lustreModule.v1.LustreClient({ - universe_domain: 'example.com', - universeDomain: 'example.net', + 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 lustreModule.v1.LustreClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'lustre.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 lustreModule.v1.LustreClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'lustre.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 lustreModule.v1.LustreClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); }); - }); - }); - it('has port', () => { - const port = lustreModule.v1.LustreClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = lustreModule.v1.LustreClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = new lustreModule.v1.LustreClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = new lustreModule.v1.LustreClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = new lustreModule.v1.LustreClient({ - fallback: true, - }); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = new lustreModule.v1.LustreClient({ + fallback: true, + }); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.lustreStub, undefined); - await client.initialize(); - assert(client.lustreStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.lustreStub, undefined); + await client.initialize(); + assert(client.lustreStub); + }); - it('has close method for the initialized client', done => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize().catch(err => { - throw err; - }); - assert(client.lustreStub); - client.close().then(() => { - done(); - }); - }); + it('has close method for the initialized client', done => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.lustreStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); - it('has close method for the non-initialized client', done => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.lustreStub, undefined); - client.close().then(() => { - done(); - }); - }); + it('has close method for the non-initialized client', done => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.lustreStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new lustreModule.v1.LustreClient({ - 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', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new lustreModule.v1.LustreClient({ + 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 lustreModule.v1.LustreClient({ - 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('getInstance', () => { - it('invokes getInstance without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.GetInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.GetInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.lustre.v1.Instance() - ); - client.innerApiCalls.getInstance = stubSimpleCall(expectedResponse); - const [response] = await client.getInstance(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new lustreModule.v1.LustreClient({ + 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); + }); }); - it('invokes getInstance without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.GetInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.GetInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.lustre.v1.Instance() - ); - client.innerApiCalls.getInstance = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getInstance( - request, - ( - err?: Error | null, - result?: protos.google.cloud.lustre.v1.IInstance | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + describe('getInstance', () => { + it('invokes getInstance without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.lustre.v1.Instance() + ); + client.innerApiCalls.getInstance = stubSimpleCall(expectedResponse); + const [response] = await client.getInstance(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes getInstance with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.GetInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.GetInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getInstance = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.getInstance(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes getInstance without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.lustre.v1.Instance() + ); + client.innerApiCalls.getInstance = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInstance( + request, + (err?: Error|null, result?: protos.google.cloud.lustre.v1.IInstance|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes getInstance with closed client', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.GetInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.GetInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getInstance(request), expectedError); - }); - }); - - describe('createInstance', () => { - it('invokes createInstance without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.CreateInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.CreateInstanceRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createInstance = - stubLongRunningCall(expectedResponse); - const [operation] = await client.createInstance(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes getInstance with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getInstance = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getInstance(request), expectedError); + const actualRequest = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes createInstance without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.CreateInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.CreateInstanceRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createInstance = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createInstance( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + it('invokes getInstance with closed client', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.GetInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.GetInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getInstance(request), expectedError); + }); }); - it('invokes createInstance with call error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.CreateInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.CreateInstanceRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createInstance = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.createInstance(request), expectedError); - const actualRequest = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + describe('createInstance', () => { + it('invokes createInstance without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.CreateInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.CreateInstanceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createInstance = stubLongRunningCall(expectedResponse); + const [operation] = await client.createInstance(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes createInstance with LRO error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.CreateInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.CreateInstanceRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createInstance = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.createInstance(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes createInstance without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.CreateInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.CreateInstanceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createInstance = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createInstance( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes checkCreateInstanceProgress without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateInstanceProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); + it('invokes createInstance with call error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.CreateInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.CreateInstanceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createInstance = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createInstance(request), expectedError); + const actualRequest = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes checkCreateInstanceProgress with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkCreateInstanceProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('updateInstance', () => { - it('invokes updateInstance without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.UpdateInstanceRequest() - ); - request.instance ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.UpdateInstanceRequest', - ['instance', 'name'] - ); - request.instance.name = defaultValue1; - const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateInstance = - stubLongRunningCall(expectedResponse); - const [operation] = await client.updateInstance(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes createInstance with LRO error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.CreateInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.CreateInstanceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createInstance = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createInstance(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes updateInstance without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.UpdateInstanceRequest() - ); - request.instance ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.UpdateInstanceRequest', - ['instance', 'name'] - ); - request.instance.name = defaultValue1; - const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateInstance = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateInstance( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.lustre.v1.IInstance, - protos.google.cloud.lustre.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes checkCreateInstanceProgress without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateInstanceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); - it('invokes updateInstance with call error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.UpdateInstanceRequest() - ); - request.instance ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.UpdateInstanceRequest', - ['instance', 'name'] - ); - request.instance.name = defaultValue1; - const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateInstance = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.updateInstance(request), expectedError); - const actualRequest = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + it('invokes checkCreateInstanceProgress with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateInstanceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); }); - it('invokes updateInstance with LRO error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.UpdateInstanceRequest() - ); - request.instance ??= {}; - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.UpdateInstanceRequest', - ['instance', 'name'] - ); - request.instance.name = defaultValue1; - const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateInstance = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.updateInstance(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.updateInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + describe('updateInstance', () => { + it('invokes updateInstance without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.UpdateInstanceRequest() + ); + request.instance ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.UpdateInstanceRequest', ['instance', 'name']); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateInstance = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateInstance(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes checkUpdateInstanceProgress without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateInstanceProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); + it('invokes updateInstance without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.UpdateInstanceRequest() + ); + request.instance ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.UpdateInstanceRequest', ['instance', 'name']); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateInstance = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateInstance( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes checkUpdateInstanceProgress with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkUpdateInstanceProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('deleteInstance', () => { - it('invokes deleteInstance without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.DeleteInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.DeleteInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteInstance = - stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteInstance(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes updateInstance with call error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.UpdateInstanceRequest() + ); + request.instance ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.UpdateInstanceRequest', ['instance', 'name']); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateInstance = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateInstance(request), expectedError); + const actualRequest = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes deleteInstance without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.DeleteInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.DeleteInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteInstance = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteInstance( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.lustre.v1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes updateInstance with LRO error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.UpdateInstanceRequest() + ); + request.instance ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.UpdateInstanceRequest', ['instance', 'name']); + request.instance.name = defaultValue1; + const expectedHeaderRequestParams = `instance.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateInstance = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateInstance(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes deleteInstance with call error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.DeleteInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.DeleteInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteInstance = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteInstance(request), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes checkUpdateInstanceProgress without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateInstanceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); - it('invokes deleteInstance with LRO error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.DeleteInstanceRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.DeleteInstanceRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteInstance = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.deleteInstance(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteInstance as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + it('invokes checkUpdateInstanceProgress with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateInstanceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); }); - it('invokes checkDeleteInstanceProgress without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteInstanceProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); + describe('deleteInstance', () => { + it('invokes deleteInstance without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.DeleteInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.DeleteInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteInstance = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteInstance(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes checkDeleteInstanceProgress with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkDeleteInstanceProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('importData', () => { - it('invokes importData without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ImportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ImportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importData = stubLongRunningCall(expectedResponse); - const [operation] = await client.importData(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes deleteInstance without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.DeleteInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.DeleteInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteInstance = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteInstance( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes importData without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ImportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ImportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.importData = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.importData( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.lustre.v1.IImportDataResponse, - protos.google.cloud.lustre.v1.IImportDataMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes deleteInstance with call error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.DeleteInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.DeleteInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteInstance = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteInstance(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes importData with call error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ImportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ImportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importData = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.importData(request), expectedError); - const actualRequest = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes deleteInstance with LRO error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.DeleteInstanceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.DeleteInstanceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteInstance = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteInstance(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteInstance as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes importData with LRO error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ImportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ImportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.importData = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.importData(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.importData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes checkDeleteInstanceProgress without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteInstanceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); - it('invokes checkImportDataProgress without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkImportDataProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + it('invokes checkDeleteInstanceProgress with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteInstanceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); }); - it('invokes checkImportDataProgress with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.checkImportDataProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('exportData', () => { - it('invokes exportData without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ExportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ExportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.exportData = stubLongRunningCall(expectedResponse); - const [operation] = await client.exportData(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + describe('importData', () => { + it('invokes importData without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ImportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ImportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importData = stubLongRunningCall(expectedResponse); + const [operation] = await client.importData(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes exportData without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ExportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ExportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.exportData = - stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.exportData( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.lustre.v1.IExportDataResponse, - protos.google.cloud.lustre.v1.IExportDataMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes importData without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ImportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ImportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importData = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importData( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes exportData with call error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ExportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ExportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportData = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.exportData(request), expectedError); - const actualRequest = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes importData with call error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ImportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ImportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importData = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.importData(request), expectedError); + const actualRequest = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes exportData with LRO error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ExportDataRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ExportDataRequest', - ['name'] - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.exportData = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.exportData(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.exportData as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes importData with LRO error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ImportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ImportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.importData = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.importData(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.importData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes checkExportDataProgress without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkExportDataProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); + it('invokes checkImportDataProgress without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportDataProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); - it('invokes checkExportDataProgress with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.checkExportDataProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('listInstances', () => { - it('invokes listInstances without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ListInstancesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ListInstancesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - ]; - client.innerApiCalls.listInstances = stubSimpleCall(expectedResponse); - const [response] = await client.listInstances(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listInstances as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listInstances as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + it('invokes checkImportDataProgress with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkImportDataProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); }); - it('invokes listInstances without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ListInstancesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ListInstancesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - ]; - client.innerApiCalls.listInstances = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listInstances( - request, - ( - err?: Error | null, - result?: protos.google.cloud.lustre.v1.IInstance[] | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listInstances as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listInstances as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + describe('exportData', () => { + it('invokes exportData without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ExportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ExportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportData = stubLongRunningCall(expectedResponse); + const [operation] = await client.exportData(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes listInstances with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ListInstancesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ListInstancesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listInstances = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(client.listInstances(request), expectedError); - const actualRequest = ( - client.innerApiCalls.listInstances as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listInstances as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); + it('invokes exportData without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ExportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ExportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportData = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.exportData( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes listInstancesStream without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ListInstancesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ListInstancesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - ]; - client.descriptors.page.listInstances.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listInstancesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.lustre.v1.Instance[] = []; - stream.on( - 'data', - (response: protos.google.cloud.lustre.v1.Instance) => { - 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.listInstances.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listInstances, request) - ); - assert( - (client.descriptors.page.listInstances.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); + it('invokes exportData with call error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ExportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ExportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportData = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.exportData(request), expectedError); + const actualRequest = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('invokes listInstancesStream with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ListInstancesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ListInstancesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listInstances.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listInstancesStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.lustre.v1.Instance[] = []; - stream.on( - 'data', - (response: protos.google.cloud.lustre.v1.Instance) => { - responses.push(response); - } - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - (client.descriptors.page.listInstances.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listInstances, request) - ); - assert( - (client.descriptors.page.listInstances.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); + it('invokes exportData with LRO error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ExportDataRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ExportDataRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportData = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.exportData(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.exportData as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - it('uses async iteration with listInstances without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ListInstancesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ListInstancesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), - ]; - client.descriptors.page.listInstances.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.lustre.v1.IInstance[] = []; - const iterable = client.listInstancesAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listInstances.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listInstances.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); + it('invokes checkExportDataProgress without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkExportDataProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); - it('uses async iteration with listInstances with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.lustre.v1.ListInstancesRequest() - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.lustre.v1.ListInstancesRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listInstances.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listInstancesAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.lustre.v1.IInstance[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listInstances.asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - (client.descriptors.page.listInstances.asyncIterate as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) - ); - }); - }); - describe('getLocation', () => { - it('invokes getLocation without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = stubSimpleCall(expectedResponse); - const response = await client.getLocation(request, expectedOptions); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.locationsClient.getLocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + it('invokes checkExportDataProgress with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkExportDataProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); }); - it('invokes getLocation without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ); - client.locationsClient.getLocation = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getLocation( - request, - expectedOptions, - ( - err?: Error | null, - result?: LocationProtos.google.cloud.location.ILocation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); + + describe('listInstances', () => { + it('invokes listInstances without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + ]; + client.innerApiCalls.listInstances = stubSimpleCall(expectedResponse); + const [response] = await client.listInstances(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstances without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + ]; + client.innerApiCalls.listInstances = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInstances( + request, + (err?: Error|null, result?: protos.google.cloud.lustre.v1.IInstance[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstances with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listInstances = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listInstances(request), expectedError); + const actualRequest = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listInstances as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInstancesStream without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + ]; + client.descriptors.page.listInstances.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listInstancesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.lustre.v1.Instance[] = []; + stream.on('data', (response: protos.google.cloud.lustre.v1.Instance) => { + 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.listInstances.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listInstances, request)); + assert( + (client.descriptors.page.listInstances.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listInstancesStream with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listInstances.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listInstancesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.lustre.v1.Instance[] = []; + stream.on('data', (response: protos.google.cloud.lustre.v1.Instance) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listInstances.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listInstances, request)); + assert( + (client.descriptors.page.listInstances.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listInstances without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + generateSampleMessage(new protos.google.cloud.lustre.v1.Instance()), + ]; + client.descriptors.page.listInstances.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.lustre.v1.IInstance[] = []; + const iterable = client.listInstancesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.locationsClient.getLocation as SinonStub).getCall(0)); - }); - it('invokes getLocation with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.GetLocationRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.locationsClient.getLocation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.getLocation(request, expectedOptions), - expectedError - ); - assert( - (client.locationsClient.getLocation as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - }); - describe('listLocationsAsync', () => { - it('uses async iteration with listLocations without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedResponse = [ - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - generateSampleMessage( - new LocationProtos.google.cloud.location.Location() - ), - ]; - client.locationsClient.descriptors.page.listLocations.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - const iterable = client.listLocationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.locationsClient.descriptors.page.listLocations - .asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - ( - client.locationsClient.descriptors.page.listLocations - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - it('uses async iteration with listLocations with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new LocationProtos.google.cloud.location.ListLocationsRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedError = new Error('expected'); - client.locationsClient.descriptors.page.listLocations.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listLocationsAsync(request); - await assert.rejects(async () => { - const responses: LocationProtos.google.cloud.location.ILocation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.locationsClient.descriptors.page.listLocations - .asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - assert( - ( - client.locationsClient.descriptors.page.listLocations - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listInstances with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.lustre.v1.ListInstancesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.lustre.v1.ListInstancesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listInstances.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listInstancesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.lustre.v1.IInstance[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listInstances.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); }); - }); - describe('getOperation', () => { - it('invokes getOperation without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const response = await client.getOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.operationsClient.getOperation as SinonStub) - .getCall(0) - .calledWith(request) - ); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); }); - it('invokes getOperation without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - client.operationsClient.getOperation = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.getOperation( - request, - undefined, - ( - err?: Error | null, - result?: operationsProtos.google.longrunning.Operation | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - it('invokes getOperation with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.GetOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.getOperation(request); - }, expectedError); - assert( - (client.operationsClient.getOperation as SinonStub) - .getCall(0) - .calledWith(request) - ); - }); - }); - describe('cancelOperation', () => { - it('invokes cancelOperation without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = - stubSimpleCall(expectedResponse); - const response = await client.cancelOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.operationsClient.cancelOperation as SinonStub) - .getCall(0) - .calledWith(request) - ); + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); }); - it('invokes cancelOperation without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.cancelOperation = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.cancelOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.cancelOperation as SinonStub).getCall(0)); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); }); - it('invokes cancelOperation with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.CancelOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.cancelOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.cancelOperation(request); - }, expectedError); - assert( - (client.operationsClient.cancelOperation as SinonStub) - .getCall(0) - .calledWith(request) - ); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); }); - }); - describe('deleteOperation', () => { - it('invokes deleteOperation without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = - stubSimpleCall(expectedResponse); - const response = await client.deleteOperation(request); - assert.deepStrictEqual(response, [expectedResponse]); - assert( - (client.operationsClient.deleteOperation as SinonStub) - .getCall(0) - .calledWith(request) - ); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); }); - it('invokes deleteOperation without error using callback', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.operationsClient.deleteOperation = sinon - .stub() - .callsArgWith(2, null, expectedResponse); - const promise = new Promise((resolve, reject) => { - client.operationsClient.deleteOperation( - request, - undefined, - ( - err?: Error | null, - result?: protos.google.protobuf.Empty | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); } - } - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - assert((client.operationsClient.deleteOperation as SinonStub).getCall(0)); - }); - it('invokes deleteOperation with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.DeleteOperationRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.deleteOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects(async () => { - await client.deleteOperation(request); - }, expectedError); - assert( - (client.operationsClient.deleteOperation as SinonStub) - .getCall(0) - .calledWith(request) - ); - }); - }); - describe('listOperationsAsync', () => { - it('uses async iteration with listOperations without error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedResponse = [ - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsResponse() - ), - ]; - client.operationsClient.descriptor.listOperations.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: operationsProtos.google.longrunning.IOperation[] = []; - const iterable = client.operationsClient.listOperationsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.operationsClient.descriptor.listOperations - .asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); - }); - it('uses async iteration with listOperations with error', async () => { - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new operationsProtos.google.longrunning.ListOperationsRequest() - ); - const expectedError = new Error('expected'); - client.operationsClient.descriptor.listOperations.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.operationsClient.listOperationsAsync(request); - await assert.rejects(async () => { - const responses: operationsProtos.google.longrunning.IOperation[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.operationsClient.descriptor.listOperations - .asyncIterate as SinonStub - ).getCall(0).args[1], - request - ); + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); }); - }); - - describe('Path templates', () => { - describe('instance', async () => { - const fakePath = '/rendered/path/instance'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - instance: 'instanceValue', - }; - const client = new lustreModule.v1.LustreClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.instancePathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.instancePathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('instancePath', () => { - const result = client.instancePath( - 'projectValue', - 'locationValue', - 'instanceValue' - ); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.instancePathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters) - ); - }); - - it('matchProjectFromInstanceName', () => { - const result = client.matchProjectFromInstanceName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.instancePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchLocationFromInstanceName', () => { - const result = client.matchLocationFromInstanceName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.instancePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); - - it('matchInstanceFromInstanceName', () => { - const result = client.matchInstanceFromInstanceName(fakePath); - assert.strictEqual(result, 'instanceValue'); - assert( - (client.pathTemplates.instancePathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath) - ); - }); + + describe('Path templates', () => { + + describe('instance', async () => { + const fakePath = "/rendered/path/instance"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + instance: "instanceValue", + }; + const client = new lustreModule.v1.LustreClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.instancePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.instancePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('instancePath', () => { + const result = client.instancePath("projectValue", "locationValue", "instanceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.instancePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromInstanceName', () => { + const result = client.matchProjectFromInstanceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromInstanceName', () => { + const result = client.matchLocationFromInstanceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchInstanceFromInstanceName', () => { + const result = client.matchInstanceFromInstanceName(fakePath); + assert.strictEqual(result, "instanceValue"); + assert((client.pathTemplates.instancePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); - }); }); diff --git a/packages/google-cloud-lustre/tsconfig.json b/packages/google-cloud-lustre/tsconfig.json index 860d6bf027be..ca73e7bfc824 100644 --- a/packages/google-cloud-lustre/tsconfig.json +++ b/packages/google-cloud-lustre/tsconfig.json @@ -5,7 +5,7 @@ "outDir": "build", "resolveJsonModule": true, "lib": [ - "es2018", + "es2023", "dom" ] }, @@ -16,6 +16,7 @@ "test/**/*.ts", "system-test/*.ts", "src/**/*.json", + "samples/**/*.json", "protos/protos.json" ] } diff --git a/packages/google-cloud-lustre/webpack.config.js b/packages/google-cloud-lustre/webpack.config.js index 8214068af8b4..d20048cfb017 100644 --- a/packages/google-cloud-lustre/webpack.config.js +++ b/packages/google-cloud-lustre/webpack.config.js @@ -36,27 +36,27 @@ module.exports = { { test: /\.tsx?$/, use: 'ts-loader', - exclude: /node_modules/, + exclude: /node_modules/ }, { test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]grpc/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]retry-request/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader', + use: 'null-loader' }, { test: /node_modules[\\/]gtoken/, - use: 'null-loader', + use: 'null-loader' }, ], }, diff --git a/packages/google-cloud-managedkafka-schemaregistry/.OwlBot.yaml b/packages/google-cloud-managedkafka-schemaregistry/.OwlBot.yaml new file mode 100644 index 000000000000..454b9b2af478 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.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/cloud/managedkafka/schemaregistry/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-managedkafka-schemaregistry/$1 + +api-name: managedkafka \ No newline at end of file diff --git a/packages/google-cloud-managedkafka-schemaregistry/.eslintignore b/packages/google-cloud-managedkafka-schemaregistry/.eslintignore new file mode 100644 index 000000000000..ea5b04aebe68 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-cloud-managedkafka-schemaregistry/.eslintrc.json b/packages/google-cloud-managedkafka-schemaregistry/.eslintrc.json new file mode 100644 index 000000000000..782153495464 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/.gitattributes b/packages/google-cloud-managedkafka-schemaregistry/.gitattributes new file mode 100644 index 000000000000..33739cb74e44 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.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-cloud-managedkafka-schemaregistry/.gitignore b/packages/google-cloud-managedkafka-schemaregistry/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.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-cloud-managedkafka-schemaregistry/.jsdoc.js b/packages/google-cloud-managedkafka-schemaregistry/.jsdoc.js new file mode 100644 index 000000000000..1e126c9228ad --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2025 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/managedkafka-schemaregistry', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-managedkafka-schemaregistry/.mocharc.js b/packages/google-cloud-managedkafka-schemaregistry/.mocharc.js new file mode 100644 index 000000000000..eef6173ab449 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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-cloud-managedkafka-schemaregistry/.nycrc b/packages/google-cloud-managedkafka-schemaregistry/.nycrc new file mode 100644 index 000000000000..b18d5472b62b --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.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-cloud-managedkafka-schemaregistry/.prettierignore b/packages/google-cloud-managedkafka-schemaregistry/.prettierignore new file mode 100644 index 000000000000..9340ad9b86d3 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-managedkafka-schemaregistry/.prettierrc.js b/packages/google-cloud-managedkafka-schemaregistry/.prettierrc.js new file mode 100644 index 000000000000..b189724933b2 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT 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-cloud-managedkafka-schemaregistry/.repo-metadata.json b/packages/google-cloud-managedkafka-schemaregistry/.repo-metadata.json new file mode 100644 index 000000000000..e7fcd8561a79 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "managedkafka", + "name_pretty": "Managed Service for Apache Kafka API", + "product_documentation": "https://cloud.google.com/managed-service-for-apache-kafka/docs", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/managedkafka/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-cloud/managedkafka-schemaregistry", + "api_id": "managedkafka.googleapis.com", + "default_version": "v1", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "managedkafka" +} + diff --git a/packages/google-cloud-managedkafka-schemaregistry/CHANGELOG.md b/packages/google-cloud-managedkafka-schemaregistry/CHANGELOG.md new file mode 100644 index 000000000000..8fc33f182056 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## 0.1.0 (2025-07-17) + + +### Features + +* Add initial files for google.cloud.managedkafka.schemaregistry.v1 ([#6476](https://github.com/googleapis/google-cloud-node/issues/6476)) ([75c7785](https://github.com/googleapis/google-cloud-node/commit/75c7785f7fd37fb0129d75f5bfdd28a332c81037)) diff --git a/packages/google-cloud-managedkafka-schemaregistry/CODE_OF_CONDUCT.md b/packages/google-cloud-managedkafka-schemaregistry/CODE_OF_CONDUCT.md new file mode 100644 index 000000000000..2add2547a812 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/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-cloud-managedkafka-schemaregistry/CONTRIBUTING.md b/packages/google-cloud-managedkafka-schemaregistry/CONTRIBUTING.md new file mode 100644 index 000000000000..fc70c15672b8 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/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 Managed Service for Apache Kafka 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=managedkafka.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-managedkafka-schemaregistry/LICENSE b/packages/google-cloud-managedkafka-schemaregistry/LICENSE new file mode 100644 index 000000000000..d64569567334 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/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-cloud-managedkafka-schemaregistry/README.md b/packages/google-cloud-managedkafka-schemaregistry/README.md new file mode 100644 index 000000000000..00614595520a --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/README.md @@ -0,0 +1,209 @@ +[//]: # "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 + +# [Managed Service for Apache Kafka API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-managedkafka-schemaregistry) + +[![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-cloud/managedkafka-schemaregistry.svg)](https://www.npmjs.org/package/@google-cloud/managedkafka-schemaregistry) + + + + +Managed Service for Apache Kafka 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-cloud-managedkafka-schemaregistry/CHANGELOG.md). + +* [Managed Service for Apache Kafka API Node.js Client API Reference][client-docs] +* [Managed Service for Apache Kafka API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-cloud-managedkafka-schemaregistry](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-managedkafka-schemaregistry) + +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 Managed Service for Apache Kafka API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-cloud/managedkafka-schemaregistry +``` + + +### 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 schema whose schema versions are to be listed. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + */ +// const parent = 'abc123' +/** + * Optional. The subject to filter the subjects by. + */ +// const subject = 'abc123' +/** + * Optional. If true, the response will include soft-deleted versions of the + * schema, even if the subject is soft-deleted. The default is false. + */ +// const deleted = true + +// Imports the Schemaregistry library +const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + +// Instantiates a client +const schemaregistryClient = new ManagedSchemaRegistryClient(); + +async function callListSchemaVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listSchemaVersions(request); + console.log(response); +} + +callListSchemaVersions(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-managedkafka-schemaregistry/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Managed_schema_registry.check_compatibility | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.create_schema_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.create_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.delete_schema_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.delete_schema_mode | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.delete_schema_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.delete_subject | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.delete_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_context | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_raw_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_raw_schema_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_schema | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_schema_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_schema_mode | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_schema_registry | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.get_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_contexts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_referenced_schemas | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_schema_registries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_schema_types | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_schema_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_subjects | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_subjects_by_schema_id | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.list_versions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.lookup_version | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.update_schema_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Managed_schema_registry.update_schema_mode | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/quickstart.js,packages/google-cloud-managedkafka-schemaregistry/samples/README.md) | + + + +The [Managed Service for Apache Kafka 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-cloud/managedkafka-schemaregistry@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/managedkafka/latest +[product-docs]: https://cloud.google.com/managed-service-for-apache-kafka/docs +[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=managedkafka.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-managedkafka-schemaregistry/package.json b/packages/google-cloud-managedkafka-schemaregistry/package.json new file mode 100644 index 000000000000..f51028fc0993 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/package.json @@ -0,0 +1,70 @@ +{ + "name": "@google-cloud/managedkafka-schemaregistry", + "version": "0.1.0", + "description": "Managed Service for Apache Kafka API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-cloud-managedkafka-schemaregistry" + }, + "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-cloud-managedkafka-schemaregistry", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google managedkafka", + "managedkafka", + "Managed Service for Apache Kafka API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "postpack": "minifyProtoJson", + "prepare": "npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^5.0.0" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.13.9", + "@types/sinon": "^17.0.4", + "c8": "^10.1.3", + "gapic-tools": "^1.0.0", + "gts": "^6.0.2", + "jsdoc": "^4.0.4", + "jsdoc-fresh": "^4.0.0", + "jsdoc-region-tag": "^3.0.0", + "linkinator": "^6.1.2", + "long": "^5.3.1", + "mocha": "^11.1.0", + "pack-n-play": "^3.0.0", + "sinon": "^21.0.0", + "typescript": "^5.8.2" + }, + "engines": { + "node": ">=18.0.0" + } +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto b/packages/google-cloud-managedkafka-schemaregistry/protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto new file mode 100644 index 000000000000..0530a474781c --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto @@ -0,0 +1,895 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.managedkafka.schemaregistry.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/httpbody.proto"; +import "google/api/resource.proto"; +import "google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.ManagedKafka.SchemaRegistry.V1"; +option go_package = "cloud.google.com/go/managedkafka/schemaregistry/apiv1/schemaregistrypb;schemaregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "SchemaRegistryProto"; +option java_package = "com.google.cloud.managedkafka.schemaregistry.v1"; +option php_namespace = "Google\\Cloud\\ManagedKafka\\SchemaRegistry\\V1"; +option ruby_package = "Google::Cloud::ManagedKafka::SchemaRegistry::V1"; + +// SchemaRegistry is a service that allows users to manage schemas for their +// Kafka clusters. It provides APIs to register, list, and delete schemas, as +// well as to get the schema for a given schema id or a given version id under a +// subject, to update the global or subject-specific compatibility mode, and to +// check the compatibility of a schema against a subject or a version. The main +// resource hierarchy is as follows: +// +// * SchemaRegistry +// * SchemaRegistry/Context +// * SchemaRegistry/Context/Schema +// * SchemaRegistry/Context/Subject +// * SchemaRegistry/Context/Subject/Version +// * SchemaRegistry/Config +// * SchemaRegistry/Mode +// +// **SchemaRegistry** is the root resource to represent a schema registry +// instance. A customer can have multiple schema registry instances in a +// project. +// +// **Context** is a context resource that represents a group of +// schemas, subjects and versions. A schema registry instance can have multiple +// contexts and always has a 'default' context. Contexts are independent of each +// other. Context is optional and if not specified, it falls back to the +// 'default' context. +// +// **Schema** is a schema resource that represents a unique schema in a context +// of a schema registry instance. Each schema has a unique schema id, and can be +// referenced by a version of a subject. +// +// **Subject** refers to the name under which the schema is registered. A +// typical subject is the Kafka topic name. A schema registry instance can have +// multiple subjects. +// +// **Version** represents a version of a subject. A subject can have multiple +// versions. Creation of new version of a subject is guarded by the +// compatibility mode configured globally or for the subject specifically. +// +// **Config** represents a config at global level cross all registry +// instances or at subject level. Currently, only compatibility is supported in +// config. +// +// **Mode** represents the mode of a schema registry or a specific subject. +// Three modes are supported: +// * READONLY: The schema registry is in read-only mode, no write operations +// allowed.. +// * READWRITE: The schema registry is in read-write mode, which allows limited +// write operations on the schema. +// * IMPORT: The schema registry is in import mode, which allows more editing +// operations on the schema for data importing purposes. +service ManagedSchemaRegistry { + option (google.api.default_host) = "managedkafka.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Get the schema registry instance. + rpc GetSchemaRegistry(GetSchemaRegistryRequest) returns (SchemaRegistry) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List schema registries. + rpc ListSchemaRegistries(ListSchemaRegistriesRequest) + returns (ListSchemaRegistriesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/schemaRegistries" + }; + option (google.api.method_signature) = "parent"; + } + + // Create a schema registry instance. + rpc CreateSchemaRegistry(CreateSchemaRegistryRequest) + returns (SchemaRegistry) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/schemaRegistries" + body: "*" + }; + option (google.api.method_signature) = "parent,schema_registry"; + } + + // Delete a schema registry instance. + rpc DeleteSchemaRegistry(DeleteSchemaRegistryRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Get the context. + rpc GetContext(GetContextRequest) returns (Context) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List contexts for a schema registry. + rpc ListContexts(ListContextsRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/contexts" + }; + option (google.api.method_signature) = "parent"; + } + + // Get the schema for the given schema id. + rpc GetSchema(GetSchemaRequest) returns (Schema) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Get the schema string for the given schema id. + // The response will be the schema string. + rpc GetRawSchema(GetSchemaRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}/schema" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/schema" + } + }; + option (google.api.method_signature) = "name"; + } + + // List the schema versions for the given schema id. + // The response will be an array of subject-version pairs as: + // [{"subject":"subject1", "version":1}, {"subject":"subject2", "version":2}]. + rpc ListSchemaVersions(ListSchemaVersionsRequest) + returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/versions" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/versions" + } + }; + option (google.api.method_signature) = "parent"; + } + + // List the supported schema types. + // The response will be an array of schema types. + rpc ListSchemaTypes(ListSchemaTypesRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/schemas/types" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/schemas/types" + } + }; + option (google.api.method_signature) = "parent"; + } + + // List subjects in the schema registry. + // The response will be an array of subject names. + rpc ListSubjects(ListSubjectsRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/subjects" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/subjects" + } + }; + option (google.api.method_signature) = "parent,subject_prefix,deleted"; + } + + // List subjects which reference a particular schema id. + // The response will be an array of subject names. + rpc ListSubjectsBySchemaId(ListSubjectsBySchemaIdRequest) + returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/subjects" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/subjects" + } + }; + option (google.api.method_signature) = "parent,subject,deleted"; + } + + // Delete a subject. + // The response will be an array of versions of the deleted subject. + rpc DeleteSubject(DeleteSubjectRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lookup a schema under the specified subject. + rpc LookupVersion(LookupVersionRequest) returns (SchemaVersion) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}" + body: "*" + } + }; + option (google.api.method_signature) = "parent,schema"; + } + + // Get a versioned schema (schema with subject/version) of a subject. + rpc GetVersion(GetVersionRequest) returns (SchemaVersion) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Get the schema string only for a version of a subject. + // The response will be the schema string. + rpc GetRawSchemaVersion(GetVersionRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/schema" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/schema" + } + }; + option (google.api.method_signature) = "name"; + } + + // Get all versions of a subject. + // The response will be an array of versions of the subject. + rpc ListVersions(ListVersionsRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versions" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Register a new version under a given subject with the given schema. + rpc CreateVersion(CreateVersionRequest) returns (CreateVersionResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versions" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions" + body: "*" + } + }; + option (google.api.method_signature) = + "parent,version,id,schema_type,schema,references,normalize"; + } + + // Delete a version of a subject. + // The response will be the deleted version id. + rpc DeleteVersion(DeleteVersionRequest) returns (google.api.HttpBody) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Get a list of IDs of schemas that reference the schema with the given + // subject and version. + rpc ListReferencedSchemas(ListReferencedSchemasRequest) + returns (google.api.HttpBody) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/referencedby" + additional_bindings { + get: "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/referencedby" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Check compatibility of a schema with all versions or a specific version of + // a subject. + rpc CheckCompatibility(CheckCompatibilityRequest) + returns (CheckCompatibilityResponse) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/schemaRegistries/*/compatibility/**}" + body: "*" + additional_bindings { + post: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/compatibility/**}" + body: "*" + } + }; + option (google.api.method_signature) = "name,schema"; + } + + // Get schema config at global level or for a subject. + rpc GetSchemaConfig(GetSchemaConfigRequest) returns (SchemaConfig) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Update config at global level or for a subject. + // Creates a SchemaSubject-level SchemaConfig if it does not exist. + rpc UpdateSchemaConfig(UpdateSchemaConfigRequest) returns (SchemaConfig) { + option (google.api.http) = { + put: "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}" + body: "*" + additional_bindings { + put: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}" + body: "*" + } + }; + option (google.api.method_signature) = "name,compatibility"; + } + + // Delete schema config for a subject. + rpc DeleteSchemaConfig(DeleteSchemaConfigRequest) returns (SchemaConfig) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Get mode at global level or for a subject. + rpc GetSchemaMode(GetSchemaModeRequest) returns (SchemaMode) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}" + additional_bindings { + get: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Update mode at global level or for a subject. + rpc UpdateSchemaMode(UpdateSchemaModeRequest) returns (SchemaMode) { + option (google.api.http) = { + put: "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}" + body: "*" + additional_bindings { + put: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}" + body: "*" + } + }; + option (google.api.method_signature) = "name,mode"; + } + + // Delete schema mode for a subject. + rpc DeleteSchemaMode(DeleteSchemaModeRequest) returns (SchemaMode) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}" + additional_bindings { + delete: "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// Request for GetSchemaRegistry. +message GetSchemaRegistryRequest { + // Required. The name of the schema registry instance to return. Structured + // like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaRegistry" + } + ]; +} + +// Request for ListSchemaRegistries. +message ListSchemaRegistriesRequest { + // Required. The parent whose schema registry instances are to be listed. + // Structured like: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; +} + +// Request for ListSchemaRegistries. +message ListSchemaRegistriesResponse { + // The schema registry instances. + repeated SchemaRegistry schema_registries = 1; +} + +// Request to create a schema registry instance. +message CreateSchemaRegistryRequest { + // Required. The parent whose schema registry instance is to be created. + // Structured like: `projects/{project}/locations/{location}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Required. The schema registry instance ID to use for this schema registry. + // The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores + // (-). The maximum length is 63 characters. + // The ID must not start with a number. + string schema_registry_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The schema registry instance to create. + // The name field is ignored. + SchemaRegistry schema_registry = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for DeleteSchemaRegistry. +message DeleteSchemaRegistryRequest { + // Required. The name of the schema registry instance to delete. Structured + // like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaRegistry" + } + ]; +} + +// Request for GetContext +message GetContextRequest { + // Required. The name of the context to return. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaContext" + } + ]; +} + +// Request for ListContexts. +message ListContextsRequest { + // Required. The parent of the contexts. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaRegistry" + } + ]; +} + +// Request for GetSchema. +message GetSchemaRequest { + // Required. The name of the schema to return. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Schema" + } + ]; + + // Optional. Used to limit the search for the schema ID to a specific subject, + // otherwise the schema ID will be searched for in all subjects in the given + // specified context. + optional string subject = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for ListSchemaTypes. +message ListSchemaTypesRequest { + // Required. The parent schema registry whose schema types are to be listed. + // Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; +} + +// Request for ListSchemaVersions. +message ListSchemaVersionsRequest { + // Required. The schema whose schema versions are to be listed. Structured + // like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/Schema" + } + ]; + + // Optional. The subject to filter the subjects by. + optional string subject = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include soft-deleted versions of the + // schema, even if the subject is soft-deleted. The default is false. + optional bool deleted = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for listing subjects. +message ListSubjectsRequest { + // Required. The parent schema registry/context whose subjects are to be + // listed. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Optional. The context to filter the subjects by, in the format of + // `:.{context}:`. If unset, all subjects in the registry are returned. Set to + // empty string or add as + // '?subjectPrefix=' at the end of this request to list subjects in the + // default context. + optional string subject_prefix = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include soft-deleted subjects. The + // default is false. + optional bool deleted = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for listing subjects. +message ListSubjectsBySchemaIdRequest { + // Required. The schema resource whose associated subjects are to be listed. + // Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Optional. The subject to filter the subjects by. + optional string subject = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will include soft-deleted subjects. The + // default is false. + optional bool deleted = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for GetVersions. +message ListVersionsRequest { + // Required. The subject whose versions are to be listed. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaSubject" + } + ]; + + // Optional. If true, the response will include soft-deleted versions of an + // active or soft-deleted subject. The default is false. + optional bool deleted = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for DeleteSubject. +message DeleteSubjectRequest { + // Required. The name of the subject to delete. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaSubject" + } + ]; + + // Optional. If true, the subject and all associated metadata including the + // schema ID will be deleted permanently. Otherwise, only the subject is + // soft-deleted. The default is false. Soft-deleted subjects can still be + // searched in ListSubjects API call with deleted=true query parameter. A + // soft-delete of a subject must be performed before a hard-delete. + optional bool permanent = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for GetVersion. +message GetVersionRequest { + // Required. The name of the subject to return versions. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaVersion" + } + ]; + + // Optional. If true, no matter if the subject/version is soft-deleted or not, + // it returns the version details. If false, it returns NOT_FOUND error if the + // subject/version is soft-deleted. The default is false. + optional bool deleted = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for CreateVersion. +message CreateVersionRequest { + // Required. The subject to create the version for. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaSubject" + } + ]; + + // Optional. The version to create. It is optional. If not specified, the + // version will be created with the max version ID of the subject increased + // by 1. If the version ID is specified, it will be used as the new version ID + // and must not be used by an existing version of the subject. + optional int32 version = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The schema ID of the schema. If not specified, the schema ID will + // be generated by the server. If the schema ID is specified, it must not be + // used by an existing schema that is different from the schema to be created. + optional int32 id = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The type of the schema. It is optional. If not specified, the + // schema type will be AVRO. + optional Schema.SchemaType schema_type = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The schema payload + string schema = 5 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema references used by the schema. + repeated Schema.SchemaReference references = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the schema will be normalized before being stored. The + // default is false. + optional bool normalize = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for CreateVersion. +message CreateVersionResponse { + // The unique identifier of the schema created. + int32 id = 1; +} + +// Request for LookupVersion. +message LookupVersionRequest { + // Required. The subject to lookup the schema in. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaSubject" + } + ]; + + // Optional. The schema type of the schema. + optional Schema.SchemaType schema_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The schema payload + string schema = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema references used by the schema. + repeated Schema.SchemaReference references = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the schema will be normalized before being looked up. + // The default is false. + optional bool normalize = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, soft-deleted versions will be included in lookup, no + // matter if the subject is active or soft-deleted. If false, soft-deleted + // versions will be excluded. The default is false. + optional bool deleted = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for DeleteVersion. +message DeleteVersionRequest { + // Required. The name of the subject version to delete. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaVersion" + } + ]; + + // Optional. If true, both the version and the referenced schema ID will be + // permanently deleted. The default is false. If false, the version will be + // deleted but the schema ID will be retained. Soft-deleted versions can still + // be searched in ListVersions API call with deleted=true query parameter. A + // soft-delete of a version must be performed before a hard-delete. + optional bool permanent = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for ListReferencedSchemas. +message ListReferencedSchemasRequest { + // Required. The version to list referenced by. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaVersion" + } + ]; +} + +// Request for CheckCompatibility. +message CheckCompatibilityRequest { + // Required. The name of the resource to check compatibility for. The format + // is either of following: + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/*/versions: Check compatibility with one or + // more versions of the specified subject. + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions/{version}: Check + // compatibility with a specific version of the subject. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "*" } + ]; + + // Optional. The schema type of the schema. + optional Schema.SchemaType schema_type = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The schema payload + string schema = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The schema references used by the schema. + repeated Schema.SchemaReference references = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If true, the response will contain the compatibility check result + // with reasons for failed checks. The default is false. + optional bool verbose = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response for CheckCompatibility. +message CheckCompatibilityResponse { + // The compatibility check result. If true, the schema is compatible with the + // resource. + bool is_compatible = 1 [json_name = "is_compatible"]; + + // Failure reasons if verbose = true. + repeated string messages = 2; +} + +// Request for getting config. +message GetSchemaConfigRequest { + // Required. The resource name to get the config for. It can be either of + // following: + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config: Get config at global level. + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}: Get config for a specific subject. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaConfig" + } + ]; + + // Optional. If true, the config will fall back to the config at the global + // level if no subject level config is found. + optional bool default_to_global = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for updating schema config. +// On a SchemaSubject-level SchemaConfig, an unset field will be removed from +// the SchemaConfig. +message UpdateSchemaConfigRequest { + // Required. The resource name to update the config for. It can be either of + // following: + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config: Update config at global level. + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}: Update config for a specific subject. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaConfig" + } + ]; + + // Required. The compatibility type of the schemas. + // Cannot be unset for a SchemaRegistry-level SchemaConfig. + // If unset on a SchemaSubject-level SchemaConfig, removes the compatibility + // field for the SchemaConfig. + optional SchemaConfig.CompatibilityType compatibility = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, the schema will be normalized before being stored or + // looked up. The default is false. Cannot be unset for a SchemaRegistry-level + // SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the + // normalize field for the SchemaConfig. + optional bool normalize = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request for deleting schema config. +message DeleteSchemaConfigRequest { + // Required. The resource name of subject to delete the config for. The format + // is + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaConfig" + } + ]; +} + +// Request for getting schema registry or subject mode. +message GetSchemaModeRequest { + // Required. The resource name of the mode. The format is + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaMode" + } + ]; +} + +// Request for updating schema registry or subject mode. +message UpdateSchemaModeRequest { + // Required. The resource name of the mode. The format is + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaMode" + } + ]; + + // Required. The mode type. + SchemaMode.ModeType mode = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request for deleting schema mode. +message DeleteSchemaModeRequest { + // Required. The resource name of subject to delete the mode for. The format + // is + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject} + // * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaMode" + } + ]; +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.proto b/packages/google-cloud-managedkafka-schemaregistry/protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.proto new file mode 100644 index 000000000000..dcfdbf6de3eb --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.proto @@ -0,0 +1,296 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.managedkafka.schemaregistry.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.ManagedKafka.SchemaRegistry.V1"; +option go_package = "cloud.google.com/go/managedkafka/schemaregistry/apiv1/schemaregistrypb;schemaregistrypb"; +option java_multiple_files = true; +option java_outer_classname = "SchemaRegistryResourcesProto"; +option java_package = "com.google.cloud.managedkafka.schemaregistry.v1"; +option php_namespace = "Google\\Cloud\\ManagedKafka\\SchemaRegistry\\V1"; +option ruby_package = "Google::Cloud::ManagedKafka::SchemaRegistry::V1"; + +// SchemaRegistry is a schema registry instance. +message SchemaRegistry { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/SchemaRegistry" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}" + plural: "schemaRegistries" + singular: "schemaRegistry" + }; + + // Identifier. The name of the schema registry instance. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + // The instance name {schema_registry} can contain the following: + // * Up to 255 characters. + // * Letters (uppercase or lowercase), numbers, and underscores. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Output only. The contexts of the schema registry instance. + repeated string contexts = 2 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaContext" + } + ]; +} + +// Context represents an independent schema grouping in a schema registry +// instance. +message Context { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/SchemaContext" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}" + plural: "contexts" + singular: "context" + }; + + // Identifier. The name of the context. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + // The context name {context} can contain the following: + // * Up to 255 characters. + // * Allowed characters: letters (uppercase or lowercase), numbers, and the + // following special characters: `.`, `-`, `_`, `+`, `%`, and `~`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The subjects of the context. + repeated string subjects = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "managedkafka.googleapis.com/SchemaSubject" + } + ]; +} + +// Schema for a Kafka message. +message Schema { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/Schema" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}" + plural: "schemas" + singular: "schema" + }; + + // SchemaReference is a reference to a schema. + message SchemaReference { + // Required. The name of the reference. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The subject of the reference. + string subject = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version of the reference. + int32 version = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Schema types. + enum SchemaType { + // No schema type. The default will be AVRO. + SCHEMA_TYPE_UNSPECIFIED = 0; + + // Avro schema type. + AVRO = 1; + + // JSON schema type. + JSON = 2; + + // Protobuf schema type. + PROTOBUF = 3; + } + + // Optional. The schema type of the schema. + SchemaType schema_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // The schema payload. + string schema_payload = 2 [json_name = "schema"]; + + // Optional. The schema references used by the schema. + repeated SchemaReference references = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Subject defines the evolution scope of schemas as a holder of schema +// versions. +message SchemaSubject { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/SchemaSubject" + pattern: [ + "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}", + "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}" + ] + singular: "subject" + plural: "subjects" + }; + + // The name of the subject. Structured like: + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + // or + // `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + // + // Subject name {subject} can contain the following: + // * Up to 255 UTF-8 bytes. + // * Allowed characters: letters (uppercase or lowercase), numbers, and the + // following special characters: `.`, `-`, `_`, `+`, `%`, and `~`. + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The versions of the subject. + repeated string versions = 3 [ + (google.api.resource_reference).type = + "managedkafka.googleapis.com/SchemaVersion", + (google.api.field_behavior) = OPTIONAL + ]; +} + +// Version of a schema. +message SchemaVersion { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/SchemaVersion" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/compatibility/subjects/{subject}/versions" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions/{version}" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/compatibility/subjects/{subject}/versions/{version}" + plural: "versions" + singular: "version" + }; + + // Required. The subject of the version. + string subject = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The version ID + int32 version_id = 2 + [json_name = "version", (google.api.field_behavior) = REQUIRED]; + + // Required. The schema ID. + int32 schema_id = 3 + [json_name = "id", (google.api.field_behavior) = REQUIRED]; + + // Optional. The schema type of the schema. + Schema.SchemaType schema_type = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The schema payload. + string schema_payload = 5 + [json_name = "schema", (google.api.field_behavior) = REQUIRED]; + + // Optional. The schema references used by the schema. + repeated Schema.SchemaReference references = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// SchemaConfig represents configuration for a schema registry or a specific +// subject. +message SchemaConfig { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/SchemaConfig" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config/{subject}" + plural: "configs" + singular: "config" + }; + + // Compatibility type of the schemas. + enum CompatibilityType { + // No compatibility check. + NONE = 0; + + // Backwards compatible with the most recent version. + BACKWARD = 1; + + // Backwards compatible with all previous versions. + BACKWARD_TRANSITIVE = 2; + + // Forwards compatible with the most recent version. + FORWARD = 3; + + // Forwards compatible with all previous versions. + FORWARD_TRANSITIVE = 4; + + // Backwards and forwards compatible with the most recent version. + FULL = 5; + + // Backwards and forwards compatible with all previous versions. + FULL_TRANSITIVE = 6; + } + + // Required. The compatibility type of the schema. + // The default value is BACKWARD. + // If unset in a SchemaSubject-level SchemaConfig, defaults to the global + // value. If unset in a SchemaRegistry-level SchemaConfig, reverts to the + // default value. + optional CompatibilityType compatibility = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, the schema will be normalized before being stored or + // looked up. The default is false. If unset in a SchemaSubject-level + // SchemaConfig, the global value will be used. If unset in a + // SchemaRegistry-level SchemaConfig, reverts to the default value. + optional bool normalize = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The subject to which this subject is an alias of. Only applicable + // for subject config. + string alias = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// SchemaMode represents the mode of a schema registry or a specific subject. +// Four modes are supported: +// * NONE: deprecated. This was the default mode for a subject, but now the +// default is unset (which means use the global schema registry setting) +// * READONLY: The schema registry is in read-only mode. +// * READWRITE: The schema registry is in read-write mode, which allows limited +// write operations on the schema. +// * IMPORT: The schema registry is in import mode, which allows more editing +// operations on the schema for data importing purposes. +message SchemaMode { + option (google.api.resource) = { + type: "managedkafka.googleapis.com/SchemaMode" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode" + pattern: "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}" + plural: "modes" + singular: "mode" + }; + + // Mode type of the schemas or subjects. + enum ModeType { + // The default / unset value. + // The subject mode is NONE/unset by default, which means use the global + // schema registry mode. This should not be used for setting the mode. + NONE = 0; + + // READONLY mode. + READONLY = 1; + + // READWRITE mode. + READWRITE = 2; + + // IMPORT mode. + IMPORT = 3; + } + + // Required. The mode type of a schema registry (READWRITE by default) or of a + // subject (unset by default, which means use the global schema registry + // setting). + ModeType mode = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/protos/protos.d.ts b/packages/google-cloud-managedkafka-schemaregistry/protos/protos.d.ts new file mode 100644 index 000000000000..653a7bc7caca --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/protos/protos.d.ts @@ -0,0 +1,11587 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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 cloud. */ + namespace cloud { + + /** Namespace managedkafka. */ + namespace managedkafka { + + /** Namespace schemaregistry. */ + namespace schemaregistry { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a ManagedSchemaRegistry */ + class ManagedSchemaRegistry extends $protobuf.rpc.Service { + + /** + * Constructs a new ManagedSchemaRegistry 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 ManagedSchemaRegistry 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): ManagedSchemaRegistry; + + /** + * Calls GetSchemaRegistry. + * @param request GetSchemaRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaRegistry + */ + public getSchemaRegistry(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaRegistryCallback): void; + + /** + * Calls GetSchemaRegistry. + * @param request GetSchemaRegistryRequest message or plain object + * @returns Promise + */ + public getSchemaRegistry(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest): Promise; + + /** + * Calls ListSchemaRegistries. + * @param request ListSchemaRegistriesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListSchemaRegistriesResponse + */ + public listSchemaRegistries(request: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaRegistriesCallback): void; + + /** + * Calls ListSchemaRegistries. + * @param request ListSchemaRegistriesRequest message or plain object + * @returns Promise + */ + public listSchemaRegistries(request: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest): Promise; + + /** + * Calls CreateSchemaRegistry. + * @param request CreateSchemaRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaRegistry + */ + public createSchemaRegistry(request: google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateSchemaRegistryCallback): void; + + /** + * Calls CreateSchemaRegistry. + * @param request CreateSchemaRegistryRequest message or plain object + * @returns Promise + */ + public createSchemaRegistry(request: google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest): Promise; + + /** + * Calls DeleteSchemaRegistry. + * @param request DeleteSchemaRegistryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteSchemaRegistry(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaRegistryCallback): void; + + /** + * Calls DeleteSchemaRegistry. + * @param request DeleteSchemaRegistryRequest message or plain object + * @returns Promise + */ + public deleteSchemaRegistry(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest): Promise; + + /** + * Calls GetContext. + * @param request GetContextRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Context + */ + public getContext(request: google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetContextCallback): void; + + /** + * Calls GetContext. + * @param request GetContextRequest message or plain object + * @returns Promise + */ + public getContext(request: google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest): Promise; + + /** + * Calls ListContexts. + * @param request ListContextsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public listContexts(request: google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListContextsCallback): void; + + /** + * Calls ListContexts. + * @param request ListContextsRequest message or plain object + * @returns Promise + */ + public listContexts(request: google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest): Promise; + + /** + * Calls GetSchema. + * @param request GetSchemaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Schema + */ + public getSchema(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaCallback): void; + + /** + * Calls GetSchema. + * @param request GetSchemaRequest message or plain object + * @returns Promise + */ + public getSchema(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest): Promise; + + /** + * Calls GetRawSchema. + * @param request GetSchemaRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public getRawSchema(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchemaCallback): void; + + /** + * Calls GetRawSchema. + * @param request GetSchemaRequest message or plain object + * @returns Promise + */ + public getRawSchema(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest): Promise; + + /** + * Calls ListSchemaVersions. + * @param request ListSchemaVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public listSchemaVersions(request: google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaVersionsCallback): void; + + /** + * Calls ListSchemaVersions. + * @param request ListSchemaVersionsRequest message or plain object + * @returns Promise + */ + public listSchemaVersions(request: google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest): Promise; + + /** + * Calls ListSchemaTypes. + * @param request ListSchemaTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public listSchemaTypes(request: google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaTypesCallback): void; + + /** + * Calls ListSchemaTypes. + * @param request ListSchemaTypesRequest message or plain object + * @returns Promise + */ + public listSchemaTypes(request: google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest): Promise; + + /** + * Calls ListSubjects. + * @param request ListSubjectsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public listSubjects(request: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjectsCallback): void; + + /** + * Calls ListSubjects. + * @param request ListSubjectsRequest message or plain object + * @returns Promise + */ + public listSubjects(request: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest): Promise; + + /** + * Calls ListSubjectsBySchemaId. + * @param request ListSubjectsBySchemaIdRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public listSubjectsBySchemaId(request: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjectsBySchemaIdCallback): void; + + /** + * Calls ListSubjectsBySchemaId. + * @param request ListSubjectsBySchemaIdRequest message or plain object + * @returns Promise + */ + public listSubjectsBySchemaId(request: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest): Promise; + + /** + * Calls DeleteSubject. + * @param request DeleteSubjectRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public deleteSubject(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSubjectCallback): void; + + /** + * Calls DeleteSubject. + * @param request DeleteSubjectRequest message or plain object + * @returns Promise + */ + public deleteSubject(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest): Promise; + + /** + * Calls LookupVersion. + * @param request LookupVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaVersion + */ + public lookupVersion(request: google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.LookupVersionCallback): void; + + /** + * Calls LookupVersion. + * @param request LookupVersionRequest message or plain object + * @returns Promise + */ + public lookupVersion(request: google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest): Promise; + + /** + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaVersion + */ + public getVersion(request: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetVersionCallback): void; + + /** + * Calls GetVersion. + * @param request GetVersionRequest message or plain object + * @returns Promise + */ + public getVersion(request: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest): Promise; + + /** + * Calls GetRawSchemaVersion. + * @param request GetVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public getRawSchemaVersion(request: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchemaVersionCallback): void; + + /** + * Calls GetRawSchemaVersion. + * @param request GetVersionRequest message or plain object + * @returns Promise + */ + public getRawSchemaVersion(request: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest): Promise; + + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public listVersions(request: google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListVersionsCallback): void; + + /** + * Calls ListVersions. + * @param request ListVersionsRequest message or plain object + * @returns Promise + */ + public listVersions(request: google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest): Promise; + + /** + * Calls CreateVersion. + * @param request CreateVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CreateVersionResponse + */ + public createVersion(request: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateVersionCallback): void; + + /** + * Calls CreateVersion. + * @param request CreateVersionRequest message or plain object + * @returns Promise + */ + public createVersion(request: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest): Promise; + + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public deleteVersion(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteVersionCallback): void; + + /** + * Calls DeleteVersion. + * @param request DeleteVersionRequest message or plain object + * @returns Promise + */ + public deleteVersion(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest): Promise; + + /** + * Calls ListReferencedSchemas. + * @param request ListReferencedSchemasRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HttpBody + */ + public listReferencedSchemas(request: google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListReferencedSchemasCallback): void; + + /** + * Calls ListReferencedSchemas. + * @param request ListReferencedSchemasRequest message or plain object + * @returns Promise + */ + public listReferencedSchemas(request: google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest): Promise; + + /** + * Calls CheckCompatibility. + * @param request CheckCompatibilityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CheckCompatibilityResponse + */ + public checkCompatibility(request: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CheckCompatibilityCallback): void; + + /** + * Calls CheckCompatibility. + * @param request CheckCompatibilityRequest message or plain object + * @returns Promise + */ + public checkCompatibility(request: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest): Promise; + + /** + * Calls GetSchemaConfig. + * @param request GetSchemaConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaConfig + */ + public getSchemaConfig(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaConfigCallback): void; + + /** + * Calls GetSchemaConfig. + * @param request GetSchemaConfigRequest message or plain object + * @returns Promise + */ + public getSchemaConfig(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest): Promise; + + /** + * Calls UpdateSchemaConfig. + * @param request UpdateSchemaConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaConfig + */ + public updateSchemaConfig(request: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaConfigCallback): void; + + /** + * Calls UpdateSchemaConfig. + * @param request UpdateSchemaConfigRequest message or plain object + * @returns Promise + */ + public updateSchemaConfig(request: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest): Promise; + + /** + * Calls DeleteSchemaConfig. + * @param request DeleteSchemaConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaConfig + */ + public deleteSchemaConfig(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaConfigCallback): void; + + /** + * Calls DeleteSchemaConfig. + * @param request DeleteSchemaConfigRequest message or plain object + * @returns Promise + */ + public deleteSchemaConfig(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest): Promise; + + /** + * Calls GetSchemaMode. + * @param request GetSchemaModeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaMode + */ + public getSchemaMode(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaModeCallback): void; + + /** + * Calls GetSchemaMode. + * @param request GetSchemaModeRequest message or plain object + * @returns Promise + */ + public getSchemaMode(request: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest): Promise; + + /** + * Calls UpdateSchemaMode. + * @param request UpdateSchemaModeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaMode + */ + public updateSchemaMode(request: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaModeCallback): void; + + /** + * Calls UpdateSchemaMode. + * @param request UpdateSchemaModeRequest message or plain object + * @returns Promise + */ + public updateSchemaMode(request: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest): Promise; + + /** + * Calls DeleteSchemaMode. + * @param request DeleteSchemaModeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SchemaMode + */ + public deleteSchemaMode(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest, callback: google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaModeCallback): void; + + /** + * Calls DeleteSchemaMode. + * @param request DeleteSchemaModeRequest message or plain object + * @returns Promise + */ + public deleteSchemaMode(request: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest): Promise; + } + + namespace ManagedSchemaRegistry { + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchemaRegistry}. + * @param error Error, if any + * @param [response] SchemaRegistry + */ + type GetSchemaRegistryCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSchemaRegistries}. + * @param error Error, if any + * @param [response] ListSchemaRegistriesResponse + */ + type ListSchemaRegistriesCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|createSchemaRegistry}. + * @param error Error, if any + * @param [response] SchemaRegistry + */ + type CreateSchemaRegistryCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSchemaRegistry}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteSchemaRegistryCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getContext}. + * @param error Error, if any + * @param [response] Context + */ + type GetContextCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.Context) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listContexts}. + * @param error Error, if any + * @param [response] HttpBody + */ + type ListContextsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchema}. + * @param error Error, if any + * @param [response] Schema + */ + type GetSchemaCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.Schema) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getRawSchema}. + * @param error Error, if any + * @param [response] HttpBody + */ + type GetRawSchemaCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSchemaVersions}. + * @param error Error, if any + * @param [response] HttpBody + */ + type ListSchemaVersionsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSchemaTypes}. + * @param error Error, if any + * @param [response] HttpBody + */ + type ListSchemaTypesCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSubjects}. + * @param error Error, if any + * @param [response] HttpBody + */ + type ListSubjectsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSubjectsBySchemaId}. + * @param error Error, if any + * @param [response] HttpBody + */ + type ListSubjectsBySchemaIdCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSubject}. + * @param error Error, if any + * @param [response] HttpBody + */ + type DeleteSubjectCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|lookupVersion}. + * @param error Error, if any + * @param [response] SchemaVersion + */ + type LookupVersionCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaVersion) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getVersion}. + * @param error Error, if any + * @param [response] SchemaVersion + */ + type GetVersionCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaVersion) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getRawSchemaVersion}. + * @param error Error, if any + * @param [response] HttpBody + */ + type GetRawSchemaVersionCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listVersions}. + * @param error Error, if any + * @param [response] HttpBody + */ + type ListVersionsCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|createVersion}. + * @param error Error, if any + * @param [response] CreateVersionResponse + */ + type CreateVersionCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteVersion}. + * @param error Error, if any + * @param [response] HttpBody + */ + type DeleteVersionCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listReferencedSchemas}. + * @param error Error, if any + * @param [response] HttpBody + */ + type ListReferencedSchemasCallback = (error: (Error|null), response?: google.api.HttpBody) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|checkCompatibility}. + * @param error Error, if any + * @param [response] CheckCompatibilityResponse + */ + type CheckCompatibilityCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchemaConfig}. + * @param error Error, if any + * @param [response] SchemaConfig + */ + type GetSchemaConfigCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaConfig) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|updateSchemaConfig}. + * @param error Error, if any + * @param [response] SchemaConfig + */ + type UpdateSchemaConfigCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaConfig) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSchemaConfig}. + * @param error Error, if any + * @param [response] SchemaConfig + */ + type DeleteSchemaConfigCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaConfig) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchemaMode}. + * @param error Error, if any + * @param [response] SchemaMode + */ + type GetSchemaModeCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaMode) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|updateSchemaMode}. + * @param error Error, if any + * @param [response] SchemaMode + */ + type UpdateSchemaModeCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaMode) => void; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSchemaMode}. + * @param error Error, if any + * @param [response] SchemaMode + */ + type DeleteSchemaModeCallback = (error: (Error|null), response?: google.cloud.managedkafka.schemaregistry.v1.SchemaMode) => void; + } + + /** Properties of a GetSchemaRegistryRequest. */ + interface IGetSchemaRegistryRequest { + + /** GetSchemaRegistryRequest name */ + name?: (string|null); + } + + /** Represents a GetSchemaRegistryRequest. */ + class GetSchemaRegistryRequest implements IGetSchemaRegistryRequest { + + /** + * Constructs a new GetSchemaRegistryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest); + + /** GetSchemaRegistryRequest name. */ + public name: string; + + /** + * Creates a new GetSchemaRegistryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaRegistryRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest): google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest; + + /** + * Encodes the specified GetSchemaRegistryRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest.verify|verify} messages. + * @param message GetSchemaRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSchemaRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest.verify|verify} messages. + * @param message GetSchemaRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSchemaRegistryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaRegistryRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest; + + /** + * Decodes a GetSchemaRegistryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaRegistryRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest; + + /** + * Verifies a GetSchemaRegistryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSchemaRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaRegistryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest; + + /** + * Creates a plain object from a GetSchemaRegistryRequest message. Also converts values to other types if specified. + * @param message GetSchemaRegistryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSchemaRegistryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSchemaRegistryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemaRegistriesRequest. */ + interface IListSchemaRegistriesRequest { + + /** ListSchemaRegistriesRequest parent */ + parent?: (string|null); + } + + /** Represents a ListSchemaRegistriesRequest. */ + class ListSchemaRegistriesRequest implements IListSchemaRegistriesRequest { + + /** + * Constructs a new ListSchemaRegistriesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest); + + /** ListSchemaRegistriesRequest parent. */ + public parent: string; + + /** + * Creates a new ListSchemaRegistriesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemaRegistriesRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest): google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest; + + /** + * Encodes the specified ListSchemaRegistriesRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest.verify|verify} messages. + * @param message ListSchemaRegistriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemaRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest.verify|verify} messages. + * @param message ListSchemaRegistriesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemaRegistriesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemaRegistriesRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest; + + /** + * Decodes a ListSchemaRegistriesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemaRegistriesRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest; + + /** + * Verifies a ListSchemaRegistriesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSchemaRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemaRegistriesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest; + + /** + * Creates a plain object from a ListSchemaRegistriesRequest message. Also converts values to other types if specified. + * @param message ListSchemaRegistriesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemaRegistriesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemaRegistriesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemaRegistriesResponse. */ + interface IListSchemaRegistriesResponse { + + /** ListSchemaRegistriesResponse schemaRegistries */ + schemaRegistries?: (google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry[]|null); + } + + /** Represents a ListSchemaRegistriesResponse. */ + class ListSchemaRegistriesResponse implements IListSchemaRegistriesResponse { + + /** + * Constructs a new ListSchemaRegistriesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse); + + /** ListSchemaRegistriesResponse schemaRegistries. */ + public schemaRegistries: google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry[]; + + /** + * Creates a new ListSchemaRegistriesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemaRegistriesResponse instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse): google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse; + + /** + * Encodes the specified ListSchemaRegistriesResponse message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse.verify|verify} messages. + * @param message ListSchemaRegistriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemaRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse.verify|verify} messages. + * @param message ListSchemaRegistriesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemaRegistriesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemaRegistriesResponse + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse; + + /** + * Decodes a ListSchemaRegistriesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemaRegistriesResponse + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse; + + /** + * Verifies a ListSchemaRegistriesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSchemaRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemaRegistriesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse; + + /** + * Creates a plain object from a ListSchemaRegistriesResponse message. Also converts values to other types if specified. + * @param message ListSchemaRegistriesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemaRegistriesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemaRegistriesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateSchemaRegistryRequest. */ + interface ICreateSchemaRegistryRequest { + + /** CreateSchemaRegistryRequest parent */ + parent?: (string|null); + + /** CreateSchemaRegistryRequest schemaRegistryId */ + schemaRegistryId?: (string|null); + + /** CreateSchemaRegistryRequest schemaRegistry */ + schemaRegistry?: (google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry|null); + } + + /** Represents a CreateSchemaRegistryRequest. */ + class CreateSchemaRegistryRequest implements ICreateSchemaRegistryRequest { + + /** + * Constructs a new CreateSchemaRegistryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest); + + /** CreateSchemaRegistryRequest parent. */ + public parent: string; + + /** CreateSchemaRegistryRequest schemaRegistryId. */ + public schemaRegistryId: string; + + /** CreateSchemaRegistryRequest schemaRegistry. */ + public schemaRegistry?: (google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry|null); + + /** + * Creates a new CreateSchemaRegistryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateSchemaRegistryRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest): google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest; + + /** + * Encodes the specified CreateSchemaRegistryRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest.verify|verify} messages. + * @param message CreateSchemaRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateSchemaRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest.verify|verify} messages. + * @param message CreateSchemaRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateSchemaRegistryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateSchemaRegistryRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest; + + /** + * Decodes a CreateSchemaRegistryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateSchemaRegistryRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest; + + /** + * Verifies a CreateSchemaRegistryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateSchemaRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateSchemaRegistryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest; + + /** + * Creates a plain object from a CreateSchemaRegistryRequest message. Also converts values to other types if specified. + * @param message CreateSchemaRegistryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateSchemaRegistryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateSchemaRegistryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSchemaRegistryRequest. */ + interface IDeleteSchemaRegistryRequest { + + /** DeleteSchemaRegistryRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSchemaRegistryRequest. */ + class DeleteSchemaRegistryRequest implements IDeleteSchemaRegistryRequest { + + /** + * Constructs a new DeleteSchemaRegistryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest); + + /** DeleteSchemaRegistryRequest name. */ + public name: string; + + /** + * Creates a new DeleteSchemaRegistryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSchemaRegistryRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest): google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest; + + /** + * Encodes the specified DeleteSchemaRegistryRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest.verify|verify} messages. + * @param message DeleteSchemaRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSchemaRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest.verify|verify} messages. + * @param message DeleteSchemaRegistryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSchemaRegistryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSchemaRegistryRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest; + + /** + * Decodes a DeleteSchemaRegistryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSchemaRegistryRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest; + + /** + * Verifies a DeleteSchemaRegistryRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSchemaRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSchemaRegistryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest; + + /** + * Creates a plain object from a DeleteSchemaRegistryRequest message. Also converts values to other types if specified. + * @param message DeleteSchemaRegistryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSchemaRegistryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSchemaRegistryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetContextRequest. */ + interface IGetContextRequest { + + /** GetContextRequest name */ + name?: (string|null); + } + + /** Represents a GetContextRequest. */ + class GetContextRequest implements IGetContextRequest { + + /** + * Constructs a new GetContextRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest); + + /** GetContextRequest name. */ + public name: string; + + /** + * Creates a new GetContextRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetContextRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest): google.cloud.managedkafka.schemaregistry.v1.GetContextRequest; + + /** + * Encodes the specified GetContextRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetContextRequest.verify|verify} messages. + * @param message GetContextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetContextRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetContextRequest.verify|verify} messages. + * @param message GetContextRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetContextRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetContextRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.GetContextRequest; + + /** + * Decodes a GetContextRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetContextRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.GetContextRequest; + + /** + * Verifies a GetContextRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetContextRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetContextRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.GetContextRequest; + + /** + * Creates a plain object from a GetContextRequest message. Also converts values to other types if specified. + * @param message GetContextRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.GetContextRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetContextRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetContextRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListContextsRequest. */ + interface IListContextsRequest { + + /** ListContextsRequest parent */ + parent?: (string|null); + } + + /** Represents a ListContextsRequest. */ + class ListContextsRequest implements IListContextsRequest { + + /** + * Constructs a new ListContextsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest); + + /** ListContextsRequest parent. */ + public parent: string; + + /** + * Creates a new ListContextsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListContextsRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest): google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest; + + /** + * Encodes the specified ListContextsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest.verify|verify} messages. + * @param message ListContextsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListContextsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest.verify|verify} messages. + * @param message ListContextsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListContextsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListContextsRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListContextsRequest; + + /** + * Decodes a ListContextsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListContextsRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListContextsRequest; + + /** + * Verifies a ListContextsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListContextsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListContextsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest; + + /** + * Creates a plain object from a ListContextsRequest message. Also converts values to other types if specified. + * @param message ListContextsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListContextsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListContextsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSchemaRequest. */ + interface IGetSchemaRequest { + + /** GetSchemaRequest name */ + name?: (string|null); + + /** GetSchemaRequest subject */ + subject?: (string|null); + } + + /** Represents a GetSchemaRequest. */ + class GetSchemaRequest implements IGetSchemaRequest { + + /** + * Constructs a new GetSchemaRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest); + + /** GetSchemaRequest name. */ + public name: string; + + /** GetSchemaRequest subject. */ + public subject?: (string|null); + + /** + * Creates a new GetSchemaRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest): google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest; + + /** + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest.verify|verify} messages. + * @param message GetSchemaRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.GetSchemaRequest; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.GetSchemaRequest; + + /** + * Verifies a GetSchemaRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest; + + /** + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * @param message GetSchemaRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSchemaRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSchemaRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemaTypesRequest. */ + interface IListSchemaTypesRequest { + + /** ListSchemaTypesRequest parent */ + parent?: (string|null); + } + + /** Represents a ListSchemaTypesRequest. */ + class ListSchemaTypesRequest implements IListSchemaTypesRequest { + + /** + * Constructs a new ListSchemaTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest); + + /** ListSchemaTypesRequest parent. */ + public parent: string; + + /** + * Creates a new ListSchemaTypesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemaTypesRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest): google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest; + + /** + * Encodes the specified ListSchemaTypesRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest.verify|verify} messages. + * @param message ListSchemaTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemaTypesRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest.verify|verify} messages. + * @param message ListSchemaTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemaTypesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemaTypesRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListSchemaTypesRequest; + + /** + * Decodes a ListSchemaTypesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemaTypesRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListSchemaTypesRequest; + + /** + * Verifies a ListSchemaTypesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSchemaTypesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemaTypesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest; + + /** + * Creates a plain object from a ListSchemaTypesRequest message. Also converts values to other types if specified. + * @param message ListSchemaTypesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemaTypesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemaTypesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSchemaVersionsRequest. */ + interface IListSchemaVersionsRequest { + + /** ListSchemaVersionsRequest parent */ + parent?: (string|null); + + /** ListSchemaVersionsRequest subject */ + subject?: (string|null); + + /** ListSchemaVersionsRequest deleted */ + deleted?: (boolean|null); + } + + /** Represents a ListSchemaVersionsRequest. */ + class ListSchemaVersionsRequest implements IListSchemaVersionsRequest { + + /** + * Constructs a new ListSchemaVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest); + + /** ListSchemaVersionsRequest parent. */ + public parent: string; + + /** ListSchemaVersionsRequest subject. */ + public subject?: (string|null); + + /** ListSchemaVersionsRequest deleted. */ + public deleted?: (boolean|null); + + /** + * Creates a new ListSchemaVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSchemaVersionsRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest): google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest; + + /** + * Encodes the specified ListSchemaVersionsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest.verify|verify} messages. + * @param message ListSchemaVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSchemaVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest.verify|verify} messages. + * @param message ListSchemaVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSchemaVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSchemaVersionsRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest; + + /** + * Decodes a ListSchemaVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSchemaVersionsRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest; + + /** + * Verifies a ListSchemaVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSchemaVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSchemaVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest; + + /** + * Creates a plain object from a ListSchemaVersionsRequest message. Also converts values to other types if specified. + * @param message ListSchemaVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSchemaVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSchemaVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSubjectsRequest. */ + interface IListSubjectsRequest { + + /** ListSubjectsRequest parent */ + parent?: (string|null); + + /** ListSubjectsRequest subjectPrefix */ + subjectPrefix?: (string|null); + + /** ListSubjectsRequest deleted */ + deleted?: (boolean|null); + } + + /** Represents a ListSubjectsRequest. */ + class ListSubjectsRequest implements IListSubjectsRequest { + + /** + * Constructs a new ListSubjectsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest); + + /** ListSubjectsRequest parent. */ + public parent: string; + + /** ListSubjectsRequest subjectPrefix. */ + public subjectPrefix?: (string|null); + + /** ListSubjectsRequest deleted. */ + public deleted?: (boolean|null); + + /** + * Creates a new ListSubjectsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSubjectsRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest): google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest; + + /** + * Encodes the specified ListSubjectsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest.verify|verify} messages. + * @param message ListSubjectsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSubjectsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest.verify|verify} messages. + * @param message ListSubjectsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSubjectsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSubjectsRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListSubjectsRequest; + + /** + * Decodes a ListSubjectsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSubjectsRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListSubjectsRequest; + + /** + * Verifies a ListSubjectsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSubjectsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSubjectsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest; + + /** + * Creates a plain object from a ListSubjectsRequest message. Also converts values to other types if specified. + * @param message ListSubjectsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSubjectsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSubjectsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListSubjectsBySchemaIdRequest. */ + interface IListSubjectsBySchemaIdRequest { + + /** ListSubjectsBySchemaIdRequest parent */ + parent?: (string|null); + + /** ListSubjectsBySchemaIdRequest subject */ + subject?: (string|null); + + /** ListSubjectsBySchemaIdRequest deleted */ + deleted?: (boolean|null); + } + + /** Represents a ListSubjectsBySchemaIdRequest. */ + class ListSubjectsBySchemaIdRequest implements IListSubjectsBySchemaIdRequest { + + /** + * Constructs a new ListSubjectsBySchemaIdRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest); + + /** ListSubjectsBySchemaIdRequest parent. */ + public parent: string; + + /** ListSubjectsBySchemaIdRequest subject. */ + public subject?: (string|null); + + /** ListSubjectsBySchemaIdRequest deleted. */ + public deleted?: (boolean|null); + + /** + * Creates a new ListSubjectsBySchemaIdRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListSubjectsBySchemaIdRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest): google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest; + + /** + * Encodes the specified ListSubjectsBySchemaIdRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest.verify|verify} messages. + * @param message ListSubjectsBySchemaIdRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListSubjectsBySchemaIdRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest.verify|verify} messages. + * @param message ListSubjectsBySchemaIdRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListSubjectsBySchemaIdRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListSubjectsBySchemaIdRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest; + + /** + * Decodes a ListSubjectsBySchemaIdRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListSubjectsBySchemaIdRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest; + + /** + * Verifies a ListSubjectsBySchemaIdRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListSubjectsBySchemaIdRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListSubjectsBySchemaIdRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest; + + /** + * Creates a plain object from a ListSubjectsBySchemaIdRequest message. Also converts values to other types if specified. + * @param message ListSubjectsBySchemaIdRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListSubjectsBySchemaIdRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListSubjectsBySchemaIdRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListVersionsRequest. */ + interface IListVersionsRequest { + + /** ListVersionsRequest parent */ + parent?: (string|null); + + /** ListVersionsRequest deleted */ + deleted?: (boolean|null); + } + + /** Represents a ListVersionsRequest. */ + class ListVersionsRequest implements IListVersionsRequest { + + /** + * Constructs a new ListVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest); + + /** ListVersionsRequest parent. */ + public parent: string; + + /** ListVersionsRequest deleted. */ + public deleted?: (boolean|null); + + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListVersionsRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest): google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest; + + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest.verify|verify} messages. + * @param message ListVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListVersionsRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListVersionsRequest; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListVersionsRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListVersionsRequest; + + /** + * Verifies a ListVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest; + + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @param message ListVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSubjectRequest. */ + interface IDeleteSubjectRequest { + + /** DeleteSubjectRequest name */ + name?: (string|null); + + /** DeleteSubjectRequest permanent */ + permanent?: (boolean|null); + } + + /** Represents a DeleteSubjectRequest. */ + class DeleteSubjectRequest implements IDeleteSubjectRequest { + + /** + * Constructs a new DeleteSubjectRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest); + + /** DeleteSubjectRequest name. */ + public name: string; + + /** DeleteSubjectRequest permanent. */ + public permanent?: (boolean|null); + + /** + * Creates a new DeleteSubjectRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSubjectRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest): google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest; + + /** + * Encodes the specified DeleteSubjectRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest.verify|verify} messages. + * @param message DeleteSubjectRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSubjectRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest.verify|verify} messages. + * @param message DeleteSubjectRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSubjectRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSubjectRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.DeleteSubjectRequest; + + /** + * Decodes a DeleteSubjectRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSubjectRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.DeleteSubjectRequest; + + /** + * Verifies a DeleteSubjectRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSubjectRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSubjectRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest; + + /** + * Creates a plain object from a DeleteSubjectRequest message. Also converts values to other types if specified. + * @param message DeleteSubjectRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSubjectRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSubjectRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetVersionRequest. */ + interface IGetVersionRequest { + + /** GetVersionRequest name */ + name?: (string|null); + + /** GetVersionRequest deleted */ + deleted?: (boolean|null); + } + + /** Represents a GetVersionRequest. */ + class GetVersionRequest implements IGetVersionRequest { + + /** + * Constructs a new GetVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest); + + /** GetVersionRequest name. */ + public name: string; + + /** GetVersionRequest deleted. */ + public deleted?: (boolean|null); + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetVersionRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest): google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest; + + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest.verify|verify} messages. + * @param message GetVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetVersionRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.GetVersionRequest; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetVersionRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.GetVersionRequest; + + /** + * Verifies a GetVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest; + + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @param message GetVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVersionRequest. */ + interface ICreateVersionRequest { + + /** CreateVersionRequest parent */ + parent?: (string|null); + + /** CreateVersionRequest version */ + version?: (number|null); + + /** CreateVersionRequest id */ + id?: (number|null); + + /** CreateVersionRequest schemaType */ + schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** CreateVersionRequest schema */ + schema?: (string|null); + + /** CreateVersionRequest references */ + references?: (google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]|null); + + /** CreateVersionRequest normalize */ + normalize?: (boolean|null); + } + + /** Represents a CreateVersionRequest. */ + class CreateVersionRequest implements ICreateVersionRequest { + + /** + * Constructs a new CreateVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest); + + /** CreateVersionRequest parent. */ + public parent: string; + + /** CreateVersionRequest version. */ + public version?: (number|null); + + /** CreateVersionRequest id. */ + public id?: (number|null); + + /** CreateVersionRequest schemaType. */ + public schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** CreateVersionRequest schema. */ + public schema: string; + + /** CreateVersionRequest references. */ + public references: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]; + + /** CreateVersionRequest normalize. */ + public normalize?: (boolean|null); + + /** + * Creates a new CreateVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVersionRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest): google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest; + + /** + * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest.verify|verify} messages. + * @param message CreateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest.verify|verify} messages. + * @param message CreateVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVersionRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.CreateVersionRequest; + + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVersionRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.CreateVersionRequest; + + /** + * Verifies a CreateVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest; + + /** + * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. + * @param message CreateVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateVersionResponse. */ + interface ICreateVersionResponse { + + /** CreateVersionResponse id */ + id?: (number|null); + } + + /** Represents a CreateVersionResponse. */ + class CreateVersionResponse implements ICreateVersionResponse { + + /** + * Constructs a new CreateVersionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse); + + /** CreateVersionResponse id. */ + public id: number; + + /** + * Creates a new CreateVersionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateVersionResponse instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse): google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse; + + /** + * Encodes the specified CreateVersionResponse message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse.verify|verify} messages. + * @param message CreateVersionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateVersionResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse.verify|verify} messages. + * @param message CreateVersionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateVersionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateVersionResponse + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.CreateVersionResponse; + + /** + * Decodes a CreateVersionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateVersionResponse + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.CreateVersionResponse; + + /** + * Verifies a CreateVersionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateVersionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateVersionResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse; + + /** + * Creates a plain object from a CreateVersionResponse message. Also converts values to other types if specified. + * @param message CreateVersionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateVersionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateVersionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LookupVersionRequest. */ + interface ILookupVersionRequest { + + /** LookupVersionRequest parent */ + parent?: (string|null); + + /** LookupVersionRequest schemaType */ + schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** LookupVersionRequest schema */ + schema?: (string|null); + + /** LookupVersionRequest references */ + references?: (google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]|null); + + /** LookupVersionRequest normalize */ + normalize?: (boolean|null); + + /** LookupVersionRequest deleted */ + deleted?: (boolean|null); + } + + /** Represents a LookupVersionRequest. */ + class LookupVersionRequest implements ILookupVersionRequest { + + /** + * Constructs a new LookupVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest); + + /** LookupVersionRequest parent. */ + public parent: string; + + /** LookupVersionRequest schemaType. */ + public schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** LookupVersionRequest schema. */ + public schema: string; + + /** LookupVersionRequest references. */ + public references: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]; + + /** LookupVersionRequest normalize. */ + public normalize?: (boolean|null); + + /** LookupVersionRequest deleted. */ + public deleted?: (boolean|null); + + /** + * Creates a new LookupVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LookupVersionRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest): google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest; + + /** + * Encodes the specified LookupVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest.verify|verify} messages. + * @param message LookupVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LookupVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest.verify|verify} messages. + * @param message LookupVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LookupVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LookupVersionRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.LookupVersionRequest; + + /** + * Decodes a LookupVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LookupVersionRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.LookupVersionRequest; + + /** + * Verifies a LookupVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LookupVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LookupVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest; + + /** + * Creates a plain object from a LookupVersionRequest message. Also converts values to other types if specified. + * @param message LookupVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LookupVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LookupVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteVersionRequest. */ + interface IDeleteVersionRequest { + + /** DeleteVersionRequest name */ + name?: (string|null); + + /** DeleteVersionRequest permanent */ + permanent?: (boolean|null); + } + + /** Represents a DeleteVersionRequest. */ + class DeleteVersionRequest implements IDeleteVersionRequest { + + /** + * Constructs a new DeleteVersionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest); + + /** DeleteVersionRequest name. */ + public name: string; + + /** DeleteVersionRequest permanent. */ + public permanent?: (boolean|null); + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteVersionRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest): google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest; + + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @param message DeleteVersionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteVersionRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.DeleteVersionRequest; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteVersionRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.DeleteVersionRequest; + + /** + * Verifies a DeleteVersionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteVersionRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @param message DeleteVersionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteVersionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteVersionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListReferencedSchemasRequest. */ + interface IListReferencedSchemasRequest { + + /** ListReferencedSchemasRequest parent */ + parent?: (string|null); + } + + /** Represents a ListReferencedSchemasRequest. */ + class ListReferencedSchemasRequest implements IListReferencedSchemasRequest { + + /** + * Constructs a new ListReferencedSchemasRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest); + + /** ListReferencedSchemasRequest parent. */ + public parent: string; + + /** + * Creates a new ListReferencedSchemasRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReferencedSchemasRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest): google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest; + + /** + * Encodes the specified ListReferencedSchemasRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest.verify|verify} messages. + * @param message ListReferencedSchemasRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReferencedSchemasRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest.verify|verify} messages. + * @param message ListReferencedSchemasRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReferencedSchemasRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReferencedSchemasRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest; + + /** + * Decodes a ListReferencedSchemasRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReferencedSchemasRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest; + + /** + * Verifies a ListReferencedSchemasRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReferencedSchemasRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReferencedSchemasRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest; + + /** + * Creates a plain object from a ListReferencedSchemasRequest message. Also converts values to other types if specified. + * @param message ListReferencedSchemasRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReferencedSchemasRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReferencedSchemasRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckCompatibilityRequest. */ + interface ICheckCompatibilityRequest { + + /** CheckCompatibilityRequest name */ + name?: (string|null); + + /** CheckCompatibilityRequest schemaType */ + schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** CheckCompatibilityRequest schema */ + schema?: (string|null); + + /** CheckCompatibilityRequest references */ + references?: (google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]|null); + + /** CheckCompatibilityRequest verbose */ + verbose?: (boolean|null); + } + + /** Represents a CheckCompatibilityRequest. */ + class CheckCompatibilityRequest implements ICheckCompatibilityRequest { + + /** + * Constructs a new CheckCompatibilityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest); + + /** CheckCompatibilityRequest name. */ + public name: string; + + /** CheckCompatibilityRequest schemaType. */ + public schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** CheckCompatibilityRequest schema. */ + public schema: string; + + /** CheckCompatibilityRequest references. */ + public references: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]; + + /** CheckCompatibilityRequest verbose. */ + public verbose?: (boolean|null); + + /** + * Creates a new CheckCompatibilityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckCompatibilityRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest; + + /** + * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest.verify|verify} messages. + * @param message CheckCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest.verify|verify} messages. + * @param message CheckCompatibilityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest; + + /** + * Verifies a CheckCompatibilityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckCompatibilityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest; + + /** + * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. + * @param message CheckCompatibilityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckCompatibilityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckCompatibilityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckCompatibilityResponse. */ + interface ICheckCompatibilityResponse { + + /** CheckCompatibilityResponse isCompatible */ + isCompatible?: (boolean|null); + + /** CheckCompatibilityResponse messages */ + messages?: (string[]|null); + } + + /** Represents a CheckCompatibilityResponse. */ + class CheckCompatibilityResponse implements ICheckCompatibilityResponse { + + /** + * Constructs a new CheckCompatibilityResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse); + + /** CheckCompatibilityResponse isCompatible. */ + public isCompatible: boolean; + + /** CheckCompatibilityResponse messages. */ + public messages: string[]; + + /** + * Creates a new CheckCompatibilityResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckCompatibilityResponse instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse; + + /** + * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse.verify|verify} messages. + * @param message CheckCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse.verify|verify} messages. + * @param message CheckCompatibilityResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse; + + /** + * Verifies a CheckCompatibilityResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckCompatibilityResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse; + + /** + * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. + * @param message CheckCompatibilityResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckCompatibilityResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckCompatibilityResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSchemaConfigRequest. */ + interface IGetSchemaConfigRequest { + + /** GetSchemaConfigRequest name */ + name?: (string|null); + + /** GetSchemaConfigRequest defaultToGlobal */ + defaultToGlobal?: (boolean|null); + } + + /** Represents a GetSchemaConfigRequest. */ + class GetSchemaConfigRequest implements IGetSchemaConfigRequest { + + /** + * Constructs a new GetSchemaConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest); + + /** GetSchemaConfigRequest name. */ + public name: string; + + /** GetSchemaConfigRequest defaultToGlobal. */ + public defaultToGlobal?: (boolean|null); + + /** + * Creates a new GetSchemaConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaConfigRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest): google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest; + + /** + * Encodes the specified GetSchemaConfigRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest.verify|verify} messages. + * @param message GetSchemaConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSchemaConfigRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest.verify|verify} messages. + * @param message GetSchemaConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSchemaConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaConfigRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.GetSchemaConfigRequest; + + /** + * Decodes a GetSchemaConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaConfigRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.GetSchemaConfigRequest; + + /** + * Verifies a GetSchemaConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSchemaConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest; + + /** + * Creates a plain object from a GetSchemaConfigRequest message. Also converts values to other types if specified. + * @param message GetSchemaConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSchemaConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSchemaConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSchemaConfigRequest. */ + interface IUpdateSchemaConfigRequest { + + /** UpdateSchemaConfigRequest name */ + name?: (string|null); + + /** UpdateSchemaConfigRequest compatibility */ + compatibility?: (google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null); + + /** UpdateSchemaConfigRequest normalize */ + normalize?: (boolean|null); + } + + /** Represents an UpdateSchemaConfigRequest. */ + class UpdateSchemaConfigRequest implements IUpdateSchemaConfigRequest { + + /** + * Constructs a new UpdateSchemaConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest); + + /** UpdateSchemaConfigRequest name. */ + public name: string; + + /** UpdateSchemaConfigRequest compatibility. */ + public compatibility?: (google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null); + + /** UpdateSchemaConfigRequest normalize. */ + public normalize?: (boolean|null); + + /** + * Creates a new UpdateSchemaConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSchemaConfigRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest): google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest; + + /** + * Encodes the specified UpdateSchemaConfigRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest.verify|verify} messages. + * @param message UpdateSchemaConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSchemaConfigRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest.verify|verify} messages. + * @param message UpdateSchemaConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSchemaConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSchemaConfigRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest; + + /** + * Decodes an UpdateSchemaConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSchemaConfigRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest; + + /** + * Verifies an UpdateSchemaConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSchemaConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSchemaConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest; + + /** + * Creates a plain object from an UpdateSchemaConfigRequest message. Also converts values to other types if specified. + * @param message UpdateSchemaConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSchemaConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSchemaConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSchemaConfigRequest. */ + interface IDeleteSchemaConfigRequest { + + /** DeleteSchemaConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSchemaConfigRequest. */ + class DeleteSchemaConfigRequest implements IDeleteSchemaConfigRequest { + + /** + * Constructs a new DeleteSchemaConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest); + + /** DeleteSchemaConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteSchemaConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSchemaConfigRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest): google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest; + + /** + * Encodes the specified DeleteSchemaConfigRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest.verify|verify} messages. + * @param message DeleteSchemaConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSchemaConfigRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest.verify|verify} messages. + * @param message DeleteSchemaConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSchemaConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSchemaConfigRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest; + + /** + * Decodes a DeleteSchemaConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSchemaConfigRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest; + + /** + * Verifies a DeleteSchemaConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSchemaConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSchemaConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest; + + /** + * Creates a plain object from a DeleteSchemaConfigRequest message. Also converts values to other types if specified. + * @param message DeleteSchemaConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSchemaConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSchemaConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSchemaModeRequest. */ + interface IGetSchemaModeRequest { + + /** GetSchemaModeRequest name */ + name?: (string|null); + } + + /** Represents a GetSchemaModeRequest. */ + class GetSchemaModeRequest implements IGetSchemaModeRequest { + + /** + * Constructs a new GetSchemaModeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest); + + /** GetSchemaModeRequest name. */ + public name: string; + + /** + * Creates a new GetSchemaModeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetSchemaModeRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest): google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest; + + /** + * Encodes the specified GetSchemaModeRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest.verify|verify} messages. + * @param message GetSchemaModeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetSchemaModeRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest.verify|verify} messages. + * @param message GetSchemaModeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetSchemaModeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetSchemaModeRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.GetSchemaModeRequest; + + /** + * Decodes a GetSchemaModeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetSchemaModeRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.GetSchemaModeRequest; + + /** + * Verifies a GetSchemaModeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetSchemaModeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetSchemaModeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest; + + /** + * Creates a plain object from a GetSchemaModeRequest message. Also converts values to other types if specified. + * @param message GetSchemaModeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetSchemaModeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetSchemaModeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateSchemaModeRequest. */ + interface IUpdateSchemaModeRequest { + + /** UpdateSchemaModeRequest name */ + name?: (string|null); + + /** UpdateSchemaModeRequest mode */ + mode?: (google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|null); + } + + /** Represents an UpdateSchemaModeRequest. */ + class UpdateSchemaModeRequest implements IUpdateSchemaModeRequest { + + /** + * Constructs a new UpdateSchemaModeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest); + + /** UpdateSchemaModeRequest name. */ + public name: string; + + /** UpdateSchemaModeRequest mode. */ + public mode: (google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType); + + /** + * Creates a new UpdateSchemaModeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateSchemaModeRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest): google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest; + + /** + * Encodes the specified UpdateSchemaModeRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest.verify|verify} messages. + * @param message UpdateSchemaModeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateSchemaModeRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest.verify|verify} messages. + * @param message UpdateSchemaModeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateSchemaModeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateSchemaModeRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest; + + /** + * Decodes an UpdateSchemaModeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateSchemaModeRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest; + + /** + * Verifies an UpdateSchemaModeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateSchemaModeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateSchemaModeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest; + + /** + * Creates a plain object from an UpdateSchemaModeRequest message. Also converts values to other types if specified. + * @param message UpdateSchemaModeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateSchemaModeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateSchemaModeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteSchemaModeRequest. */ + interface IDeleteSchemaModeRequest { + + /** DeleteSchemaModeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteSchemaModeRequest. */ + class DeleteSchemaModeRequest implements IDeleteSchemaModeRequest { + + /** + * Constructs a new DeleteSchemaModeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest); + + /** DeleteSchemaModeRequest name. */ + public name: string; + + /** + * Creates a new DeleteSchemaModeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteSchemaModeRequest instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest): google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest; + + /** + * Encodes the specified DeleteSchemaModeRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest.verify|verify} messages. + * @param message DeleteSchemaModeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteSchemaModeRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest.verify|verify} messages. + * @param message DeleteSchemaModeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteSchemaModeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteSchemaModeRequest + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest; + + /** + * Decodes a DeleteSchemaModeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteSchemaModeRequest + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest; + + /** + * Verifies a DeleteSchemaModeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteSchemaModeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteSchemaModeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest; + + /** + * Creates a plain object from a DeleteSchemaModeRequest message. Also converts values to other types if specified. + * @param message DeleteSchemaModeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteSchemaModeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteSchemaModeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaRegistry. */ + interface ISchemaRegistry { + + /** SchemaRegistry name */ + name?: (string|null); + + /** SchemaRegistry contexts */ + contexts?: (string[]|null); + } + + /** Represents a SchemaRegistry. */ + class SchemaRegistry implements ISchemaRegistry { + + /** + * Constructs a new SchemaRegistry. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry); + + /** SchemaRegistry name. */ + public name: string; + + /** SchemaRegistry contexts. */ + public contexts: string[]; + + /** + * Creates a new SchemaRegistry instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaRegistry instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry): google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry; + + /** + * Encodes the specified SchemaRegistry message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.verify|verify} messages. + * @param message SchemaRegistry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaRegistry message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.verify|verify} messages. + * @param message SchemaRegistry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaRegistry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaRegistry + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.SchemaRegistry; + + /** + * Decodes a SchemaRegistry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaRegistry + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.SchemaRegistry; + + /** + * Verifies a SchemaRegistry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaRegistry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaRegistry + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry; + + /** + * Creates a plain object from a SchemaRegistry message. Also converts values to other types if specified. + * @param message SchemaRegistry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaRegistry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaRegistry + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Context. */ + interface IContext { + + /** Context name */ + name?: (string|null); + + /** Context subjects */ + subjects?: (string[]|null); + } + + /** Represents a Context. */ + class Context implements IContext { + + /** + * Constructs a new Context. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.IContext); + + /** Context name. */ + public name: string; + + /** Context subjects. */ + public subjects: string[]; + + /** + * Creates a new Context instance using the specified properties. + * @param [properties] Properties to set + * @returns Context instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.IContext): google.cloud.managedkafka.schemaregistry.v1.Context; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Context.verify|verify} messages. + * @param message Context message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.IContext, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Context message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Context + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.Context; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Context + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.Context; + + /** + * Verifies a Context message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Context + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.Context; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @param message Context + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.Context, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Context to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Context + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Schema. */ + interface ISchema { + + /** Schema schemaType */ + schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** Schema schemaPayload */ + schemaPayload?: (string|null); + + /** Schema references */ + references?: (google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]|null); + } + + /** Represents a Schema. */ + class Schema implements ISchema { + + /** + * Constructs a new Schema. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchema); + + /** Schema schemaType. */ + public schemaType: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType); + + /** Schema schemaPayload. */ + public schemaPayload: string; + + /** Schema references. */ + public references: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]; + + /** + * Creates a new Schema instance using the specified properties. + * @param [properties] Properties to set + * @returns Schema instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchema): google.cloud.managedkafka.schemaregistry.v1.Schema; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.verify|verify} messages. + * @param message Schema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schema + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.Schema; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schema + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.Schema; + + /** + * Verifies a Schema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schema + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.Schema; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @param message Schema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Schema { + + /** Properties of a SchemaReference. */ + interface ISchemaReference { + + /** SchemaReference name */ + name?: (string|null); + + /** SchemaReference subject */ + subject?: (string|null); + + /** SchemaReference version */ + version?: (number|null); + } + + /** Represents a SchemaReference. */ + class SchemaReference implements ISchemaReference { + + /** + * Constructs a new SchemaReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference); + + /** SchemaReference name. */ + public name: string; + + /** SchemaReference subject. */ + public subject: string; + + /** SchemaReference version. */ + public version: number; + + /** + * Creates a new SchemaReference instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaReference instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference): google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference; + + /** + * Encodes the specified SchemaReference message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify|verify} messages. + * @param message SchemaReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaReference message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify|verify} messages. + * @param message SchemaReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaReference + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.Schema.SchemaReference; + + /** + * Decodes a SchemaReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaReference + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.Schema.SchemaReference; + + /** + * Verifies a SchemaReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference; + + /** + * Creates a plain object from a SchemaReference message. Also converts values to other types if specified. + * @param message SchemaReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SchemaType enum. */ + enum SchemaType { + SCHEMA_TYPE_UNSPECIFIED = 0, + AVRO = 1, + JSON = 2, + PROTOBUF = 3 + } + } + + /** Properties of a SchemaSubject. */ + interface ISchemaSubject { + + /** SchemaSubject name */ + name?: (string|null); + + /** SchemaSubject versions */ + versions?: (string[]|null); + } + + /** Represents a SchemaSubject. */ + class SchemaSubject implements ISchemaSubject { + + /** + * Constructs a new SchemaSubject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject); + + /** SchemaSubject name. */ + public name: string; + + /** SchemaSubject versions. */ + public versions: string[]; + + /** + * Creates a new SchemaSubject instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaSubject instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject): google.cloud.managedkafka.schemaregistry.v1.SchemaSubject; + + /** + * Encodes the specified SchemaSubject message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaSubject.verify|verify} messages. + * @param message SchemaSubject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaSubject message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaSubject.verify|verify} messages. + * @param message SchemaSubject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaSubject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaSubject + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.SchemaSubject; + + /** + * Decodes a SchemaSubject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaSubject + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.SchemaSubject; + + /** + * Verifies a SchemaSubject message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaSubject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaSubject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.SchemaSubject; + + /** + * Creates a plain object from a SchemaSubject message. Also converts values to other types if specified. + * @param message SchemaSubject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.SchemaSubject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaSubject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaSubject + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaVersion. */ + interface ISchemaVersion { + + /** SchemaVersion subject */ + subject?: (string|null); + + /** SchemaVersion versionId */ + versionId?: (number|null); + + /** SchemaVersion schemaId */ + schemaId?: (number|null); + + /** SchemaVersion schemaType */ + schemaType?: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null); + + /** SchemaVersion schemaPayload */ + schemaPayload?: (string|null); + + /** SchemaVersion references */ + references?: (google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]|null); + } + + /** Represents a SchemaVersion. */ + class SchemaVersion implements ISchemaVersion { + + /** + * Constructs a new SchemaVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion); + + /** SchemaVersion subject. */ + public subject: string; + + /** SchemaVersion versionId. */ + public versionId: number; + + /** SchemaVersion schemaId. */ + public schemaId: number; + + /** SchemaVersion schemaType. */ + public schemaType: (google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType); + + /** SchemaVersion schemaPayload. */ + public schemaPayload: string; + + /** SchemaVersion references. */ + public references: google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference[]; + + /** + * Creates a new SchemaVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaVersion instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion): google.cloud.managedkafka.schemaregistry.v1.SchemaVersion; + + /** + * Encodes the specified SchemaVersion message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaVersion.verify|verify} messages. + * @param message SchemaVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaVersion message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaVersion.verify|verify} messages. + * @param message SchemaVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaVersion + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.SchemaVersion; + + /** + * Decodes a SchemaVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaVersion + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.SchemaVersion; + + /** + * Verifies a SchemaVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.SchemaVersion; + + /** + * Creates a plain object from a SchemaVersion message. Also converts values to other types if specified. + * @param message SchemaVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.SchemaVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SchemaConfig. */ + interface ISchemaConfig { + + /** SchemaConfig compatibility */ + compatibility?: (google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null); + + /** SchemaConfig normalize */ + normalize?: (boolean|null); + + /** SchemaConfig alias */ + alias?: (string|null); + } + + /** Represents a SchemaConfig. */ + class SchemaConfig implements ISchemaConfig { + + /** + * Constructs a new SchemaConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig); + + /** SchemaConfig compatibility. */ + public compatibility?: (google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null); + + /** SchemaConfig normalize. */ + public normalize?: (boolean|null); + + /** SchemaConfig alias. */ + public alias: string; + + /** + * Creates a new SchemaConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaConfig instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig): google.cloud.managedkafka.schemaregistry.v1.SchemaConfig; + + /** + * Encodes the specified SchemaConfig message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.verify|verify} messages. + * @param message SchemaConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.verify|verify} messages. + * @param message SchemaConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaConfig + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.SchemaConfig; + + /** + * Decodes a SchemaConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaConfig + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.SchemaConfig; + + /** + * Verifies a SchemaConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.SchemaConfig; + + /** + * Creates a plain object from a SchemaConfig message. Also converts values to other types if specified. + * @param message SchemaConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.SchemaConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaConfig { + + /** CompatibilityType enum. */ + enum CompatibilityType { + NONE = 0, + BACKWARD = 1, + BACKWARD_TRANSITIVE = 2, + FORWARD = 3, + FORWARD_TRANSITIVE = 4, + FULL = 5, + FULL_TRANSITIVE = 6 + } + } + + /** Properties of a SchemaMode. */ + interface ISchemaMode { + + /** SchemaMode mode */ + mode?: (google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|null); + } + + /** Represents a SchemaMode. */ + class SchemaMode implements ISchemaMode { + + /** + * Constructs a new SchemaMode. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaMode); + + /** SchemaMode mode. */ + public mode: (google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|keyof typeof google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType); + + /** + * Creates a new SchemaMode instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaMode instance + */ + public static create(properties?: google.cloud.managedkafka.schemaregistry.v1.ISchemaMode): google.cloud.managedkafka.schemaregistry.v1.SchemaMode; + + /** + * Encodes the specified SchemaMode message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaMode.verify|verify} messages. + * @param message SchemaMode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaMode message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaMode.verify|verify} messages. + * @param message SchemaMode message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaMode message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaMode + * @throws {Error} If the payload is not 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.managedkafka.schemaregistry.v1.SchemaMode; + + /** + * Decodes a SchemaMode message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaMode + * @throws {Error} If the payload 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.managedkafka.schemaregistry.v1.SchemaMode; + + /** + * Verifies a SchemaMode message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaMode message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaMode + */ + public static fromObject(object: { [k: string]: any }): google.cloud.managedkafka.schemaregistry.v1.SchemaMode; + + /** + * Creates a plain object from a SchemaMode message. Also converts values to other types if specified. + * @param message SchemaMode + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.managedkafka.schemaregistry.v1.SchemaMode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaMode to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaMode + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaMode { + + /** ModeType enum. */ + enum ModeType { + NONE = 0, + READONLY = 1, + READWRITE = 2, + IMPORT = 3 + } + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|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[]; + + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|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); + + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|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; + } + + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|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); + + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** + * 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 + } + + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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 HttpBody. */ + interface IHttpBody { + + /** HttpBody contentType */ + contentType?: (string|null); + + /** HttpBody data */ + data?: (Uint8Array|Buffer|string|null); + + /** HttpBody extensions */ + extensions?: (google.protobuf.IAny[]|null); + } + + /** Represents a HttpBody. */ + class HttpBody implements IHttpBody { + + /** + * Constructs a new HttpBody. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpBody); + + /** HttpBody contentType. */ + public contentType: string; + + /** HttpBody data. */ + public data: (Uint8Array|Buffer|string); + + /** HttpBody extensions. */ + public extensions: google.protobuf.IAny[]; + + /** + * Creates a new HttpBody instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpBody instance + */ + public static create(properties?: google.api.IHttpBody): google.api.HttpBody; + + /** + * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @param message HttpBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @param message HttpBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpBody message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpBody + * @throws {Error} If the payload is not 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.HttpBody; + + /** + * Decodes a HttpBody message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpBody + * @throws {Error} If the payload 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.HttpBody; + + /** + * Verifies a HttpBody message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpBody message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpBody + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpBody; + + /** + * Creates a plain object from a HttpBody message. Also converts values to other types if specified. + * @param message HttpBody + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpBody, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpBody to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpBody + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** 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_LEGACY = 900, + 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 optionDependency */ + optionDependency?: (string[]|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 optionDependency. */ + public optionDependency: string[]; + + /** 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); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|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[]; + + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * 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); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|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[]; + + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * 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 featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|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 featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|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 a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @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 featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|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 featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|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); + + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + + /** + * 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 + } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } + } + + /** 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 overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (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 overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (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 + } + } + } + + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/protos/protos.js b/packages/google-cloud-managedkafka-schemaregistry/protos/protos.js new file mode 100644 index 000000000000..e68ad2f01b66 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/protos/protos.js @@ -0,0 +1,30723 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_managedkafka_schemaregistry_protos || ($protobuf.roots._google_cloud_managedkafka_schemaregistry_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.managedkafka = (function() { + + /** + * Namespace managedkafka. + * @memberof google.cloud + * @namespace + */ + var managedkafka = {}; + + managedkafka.schemaregistry = (function() { + + /** + * Namespace schemaregistry. + * @memberof google.cloud.managedkafka + * @namespace + */ + var schemaregistry = {}; + + schemaregistry.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.managedkafka.schemaregistry + * @namespace + */ + var v1 = {}; + + v1.ManagedSchemaRegistry = (function() { + + /** + * Constructs a new ManagedSchemaRegistry service. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ManagedSchemaRegistry + * @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 ManagedSchemaRegistry(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ManagedSchemaRegistry.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ManagedSchemaRegistry; + + /** + * Creates new ManagedSchemaRegistry service using the specified rpc implementation. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @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 {ManagedSchemaRegistry} RPC service. Useful where requests and/or responses are streamed. + */ + ManagedSchemaRegistry.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchemaRegistry}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetSchemaRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} [response] SchemaRegistry + */ + + /** + * Calls GetSchemaRegistry. + * @function getSchemaRegistry + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest} request GetSchemaRegistryRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaRegistryCallback} callback Node-style callback called with the error, if any, and SchemaRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getSchemaRegistry = function getSchemaRegistry(request, callback) { + return this.rpcCall(getSchemaRegistry, $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry, request, callback); + }, "name", { value: "GetSchemaRegistry" }); + + /** + * Calls GetSchemaRegistry. + * @function getSchemaRegistry + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest} request GetSchemaRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSchemaRegistries}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListSchemaRegistriesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse} [response] ListSchemaRegistriesResponse + */ + + /** + * Calls ListSchemaRegistries. + * @function listSchemaRegistries + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest} request ListSchemaRegistriesRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaRegistriesCallback} callback Node-style callback called with the error, if any, and ListSchemaRegistriesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listSchemaRegistries = function listSchemaRegistries(request, callback) { + return this.rpcCall(listSchemaRegistries, $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest, $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse, request, callback); + }, "name", { value: "ListSchemaRegistries" }); + + /** + * Calls ListSchemaRegistries. + * @function listSchemaRegistries + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest} request ListSchemaRegistriesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|createSchemaRegistry}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef CreateSchemaRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} [response] SchemaRegistry + */ + + /** + * Calls CreateSchemaRegistry. + * @function createSchemaRegistry + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest} request CreateSchemaRegistryRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateSchemaRegistryCallback} callback Node-style callback called with the error, if any, and SchemaRegistry + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.createSchemaRegistry = function createSchemaRegistry(request, callback) { + return this.rpcCall(createSchemaRegistry, $root.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry, request, callback); + }, "name", { value: "CreateSchemaRegistry" }); + + /** + * Calls CreateSchemaRegistry. + * @function createSchemaRegistry + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest} request CreateSchemaRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSchemaRegistry}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef DeleteSchemaRegistryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteSchemaRegistry. + * @function deleteSchemaRegistry + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest} request DeleteSchemaRegistryRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaRegistryCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.deleteSchemaRegistry = function deleteSchemaRegistry(request, callback) { + return this.rpcCall(deleteSchemaRegistry, $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteSchemaRegistry" }); + + /** + * Calls DeleteSchemaRegistry. + * @function deleteSchemaRegistry + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest} request DeleteSchemaRegistryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getContext}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetContextCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.Context} [response] Context + */ + + /** + * Calls GetContext. + * @function getContext + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest} request GetContextRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetContextCallback} callback Node-style callback called with the error, if any, and Context + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getContext = function getContext(request, callback) { + return this.rpcCall(getContext, $root.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest, $root.google.cloud.managedkafka.schemaregistry.v1.Context, request, callback); + }, "name", { value: "GetContext" }); + + /** + * Calls GetContext. + * @function getContext + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest} request GetContextRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listContexts}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListContextsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls ListContexts. + * @function listContexts + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest} request ListContextsRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListContextsCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listContexts = function listContexts(request, callback) { + return this.rpcCall(listContexts, $root.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "ListContexts" }); + + /** + * Calls ListContexts. + * @function listContexts + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest} request ListContextsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchema}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetSchemaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema} [response] Schema + */ + + /** + * Calls GetSchema. + * @function getSchema + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest} request GetSchemaRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaCallback} callback Node-style callback called with the error, if any, and Schema + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getSchema = function getSchema(request, callback) { + return this.rpcCall(getSchema, $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest, $root.google.cloud.managedkafka.schemaregistry.v1.Schema, request, callback); + }, "name", { value: "GetSchema" }); + + /** + * Calls GetSchema. + * @function getSchema + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest} request GetSchemaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getRawSchema}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetRawSchemaCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls GetRawSchema. + * @function getRawSchema + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest} request GetSchemaRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchemaCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getRawSchema = function getRawSchema(request, callback) { + return this.rpcCall(getRawSchema, $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "GetRawSchema" }); + + /** + * Calls GetRawSchema. + * @function getRawSchema + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest} request GetSchemaRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSchemaVersions}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListSchemaVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls ListSchemaVersions. + * @function listSchemaVersions + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest} request ListSchemaVersionsRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaVersionsCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listSchemaVersions = function listSchemaVersions(request, callback) { + return this.rpcCall(listSchemaVersions, $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "ListSchemaVersions" }); + + /** + * Calls ListSchemaVersions. + * @function listSchemaVersions + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest} request ListSchemaVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSchemaTypes}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListSchemaTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls ListSchemaTypes. + * @function listSchemaTypes + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest} request ListSchemaTypesRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaTypesCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listSchemaTypes = function listSchemaTypes(request, callback) { + return this.rpcCall(listSchemaTypes, $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "ListSchemaTypes" }); + + /** + * Calls ListSchemaTypes. + * @function listSchemaTypes + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest} request ListSchemaTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSubjects}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListSubjectsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls ListSubjects. + * @function listSubjects + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest} request ListSubjectsRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjectsCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listSubjects = function listSubjects(request, callback) { + return this.rpcCall(listSubjects, $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "ListSubjects" }); + + /** + * Calls ListSubjects. + * @function listSubjects + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest} request ListSubjectsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listSubjectsBySchemaId}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListSubjectsBySchemaIdCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls ListSubjectsBySchemaId. + * @function listSubjectsBySchemaId + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest} request ListSubjectsBySchemaIdRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjectsBySchemaIdCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listSubjectsBySchemaId = function listSubjectsBySchemaId(request, callback) { + return this.rpcCall(listSubjectsBySchemaId, $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "ListSubjectsBySchemaId" }); + + /** + * Calls ListSubjectsBySchemaId. + * @function listSubjectsBySchemaId + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest} request ListSubjectsBySchemaIdRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSubject}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef DeleteSubjectCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls DeleteSubject. + * @function deleteSubject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest} request DeleteSubjectRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSubjectCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.deleteSubject = function deleteSubject(request, callback) { + return this.rpcCall(deleteSubject, $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "DeleteSubject" }); + + /** + * Calls DeleteSubject. + * @function deleteSubject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest} request DeleteSubjectRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|lookupVersion}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef LookupVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaVersion} [response] SchemaVersion + */ + + /** + * Calls LookupVersion. + * @function lookupVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest} request LookupVersionRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.LookupVersionCallback} callback Node-style callback called with the error, if any, and SchemaVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.lookupVersion = function lookupVersion(request, callback) { + return this.rpcCall(lookupVersion, $root.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion, request, callback); + }, "name", { value: "LookupVersion" }); + + /** + * Calls LookupVersion. + * @function lookupVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest} request LookupVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getVersion}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaVersion} [response] SchemaVersion + */ + + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetVersionCallback} callback Node-style callback called with the error, if any, and SchemaVersion + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getVersion = function getVersion(request, callback) { + return this.rpcCall(getVersion, $root.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion, request, callback); + }, "name", { value: "GetVersion" }); + + /** + * Calls GetVersion. + * @function getVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getRawSchemaVersion}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetRawSchemaVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls GetRawSchemaVersion. + * @function getRawSchemaVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchemaVersionCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getRawSchemaVersion = function getRawSchemaVersion(request, callback) { + return this.rpcCall(getRawSchemaVersion, $root.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "GetRawSchemaVersion" }); + + /** + * Calls GetRawSchemaVersion. + * @function getRawSchemaVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest} request GetVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listVersions}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls ListVersions. + * @function listVersions + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListVersionsCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listVersions = function listVersions(request, callback) { + return this.rpcCall(listVersions, $root.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "ListVersions" }); + + /** + * Calls ListVersions. + * @function listVersions + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest} request ListVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|createVersion}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef CreateVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse} [response] CreateVersionResponse + */ + + /** + * Calls CreateVersion. + * @function createVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest} request CreateVersionRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateVersionCallback} callback Node-style callback called with the error, if any, and CreateVersionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.createVersion = function createVersion(request, callback) { + return this.rpcCall(createVersion, $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest, $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse, request, callback); + }, "name", { value: "CreateVersion" }); + + /** + * Calls CreateVersion. + * @function createVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest} request CreateVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteVersion}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef DeleteVersionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteVersionCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.deleteVersion = function deleteVersion(request, callback) { + return this.rpcCall(deleteVersion, $root.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "DeleteVersion" }); + + /** + * Calls DeleteVersion. + * @function deleteVersion + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest} request DeleteVersionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|listReferencedSchemas}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef ListReferencedSchemasCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.api.HttpBody} [response] HttpBody + */ + + /** + * Calls ListReferencedSchemas. + * @function listReferencedSchemas + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest} request ListReferencedSchemasRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListReferencedSchemasCallback} callback Node-style callback called with the error, if any, and HttpBody + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.listReferencedSchemas = function listReferencedSchemas(request, callback) { + return this.rpcCall(listReferencedSchemas, $root.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest, $root.google.api.HttpBody, request, callback); + }, "name", { value: "ListReferencedSchemas" }); + + /** + * Calls ListReferencedSchemas. + * @function listReferencedSchemas + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest} request ListReferencedSchemasRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|checkCompatibility}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef CheckCompatibilityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse} [response] CheckCompatibilityResponse + */ + + /** + * Calls CheckCompatibility. + * @function checkCompatibility + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CheckCompatibilityCallback} callback Node-style callback called with the error, if any, and CheckCompatibilityResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.checkCompatibility = function checkCompatibility(request, callback) { + return this.rpcCall(checkCompatibility, $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest, $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse, request, callback); + }, "name", { value: "CheckCompatibility" }); + + /** + * Calls CheckCompatibility. + * @function checkCompatibility + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest} request CheckCompatibilityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchemaConfig}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetSchemaConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} [response] SchemaConfig + */ + + /** + * Calls GetSchemaConfig. + * @function getSchemaConfig + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest} request GetSchemaConfigRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaConfigCallback} callback Node-style callback called with the error, if any, and SchemaConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getSchemaConfig = function getSchemaConfig(request, callback) { + return this.rpcCall(getSchemaConfig, $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig, request, callback); + }, "name", { value: "GetSchemaConfig" }); + + /** + * Calls GetSchemaConfig. + * @function getSchemaConfig + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest} request GetSchemaConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|updateSchemaConfig}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef UpdateSchemaConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} [response] SchemaConfig + */ + + /** + * Calls UpdateSchemaConfig. + * @function updateSchemaConfig + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest} request UpdateSchemaConfigRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaConfigCallback} callback Node-style callback called with the error, if any, and SchemaConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.updateSchemaConfig = function updateSchemaConfig(request, callback) { + return this.rpcCall(updateSchemaConfig, $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig, request, callback); + }, "name", { value: "UpdateSchemaConfig" }); + + /** + * Calls UpdateSchemaConfig. + * @function updateSchemaConfig + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest} request UpdateSchemaConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSchemaConfig}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef DeleteSchemaConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} [response] SchemaConfig + */ + + /** + * Calls DeleteSchemaConfig. + * @function deleteSchemaConfig + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest} request DeleteSchemaConfigRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaConfigCallback} callback Node-style callback called with the error, if any, and SchemaConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.deleteSchemaConfig = function deleteSchemaConfig(request, callback) { + return this.rpcCall(deleteSchemaConfig, $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig, request, callback); + }, "name", { value: "DeleteSchemaConfig" }); + + /** + * Calls DeleteSchemaConfig. + * @function deleteSchemaConfig + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest} request DeleteSchemaConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|getSchemaMode}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef GetSchemaModeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} [response] SchemaMode + */ + + /** + * Calls GetSchemaMode. + * @function getSchemaMode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest} request GetSchemaModeRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaModeCallback} callback Node-style callback called with the error, if any, and SchemaMode + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.getSchemaMode = function getSchemaMode(request, callback) { + return this.rpcCall(getSchemaMode, $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode, request, callback); + }, "name", { value: "GetSchemaMode" }); + + /** + * Calls GetSchemaMode. + * @function getSchemaMode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest} request GetSchemaModeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|updateSchemaMode}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef UpdateSchemaModeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} [response] SchemaMode + */ + + /** + * Calls UpdateSchemaMode. + * @function updateSchemaMode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest} request UpdateSchemaModeRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaModeCallback} callback Node-style callback called with the error, if any, and SchemaMode + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.updateSchemaMode = function updateSchemaMode(request, callback) { + return this.rpcCall(updateSchemaMode, $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode, request, callback); + }, "name", { value: "UpdateSchemaMode" }); + + /** + * Calls UpdateSchemaMode. + * @function updateSchemaMode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest} request UpdateSchemaModeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry|deleteSchemaMode}. + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @typedef DeleteSchemaModeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} [response] SchemaMode + */ + + /** + * Calls DeleteSchemaMode. + * @function deleteSchemaMode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest} request DeleteSchemaModeRequest message or plain object + * @param {google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaModeCallback} callback Node-style callback called with the error, if any, and SchemaMode + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ManagedSchemaRegistry.prototype.deleteSchemaMode = function deleteSchemaMode(request, callback) { + return this.rpcCall(deleteSchemaMode, $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest, $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode, request, callback); + }, "name", { value: "DeleteSchemaMode" }); + + /** + * Calls DeleteSchemaMode. + * @function deleteSchemaMode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry + * @instance + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest} request DeleteSchemaModeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ManagedSchemaRegistry; + })(); + + v1.GetSchemaRegistryRequest = (function() { + + /** + * Properties of a GetSchemaRegistryRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IGetSchemaRegistryRequest + * @property {string|null} [name] GetSchemaRegistryRequest name + */ + + /** + * Constructs a new GetSchemaRegistryRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a GetSchemaRegistryRequest. + * @implements IGetSchemaRegistryRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest=} [properties] Properties to set + */ + function GetSchemaRegistryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSchemaRegistryRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @instance + */ + GetSchemaRegistryRequest.prototype.name = ""; + + /** + * Creates a new GetSchemaRegistryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest} GetSchemaRegistryRequest instance + */ + GetSchemaRegistryRequest.create = function create(properties) { + return new GetSchemaRegistryRequest(properties); + }; + + /** + * Encodes the specified GetSchemaRegistryRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest} message GetSchemaRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaRegistryRequest.encode = function encode(message, writer) { + 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 GetSchemaRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest} message GetSchemaRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSchemaRegistryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest} GetSchemaRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaRegistryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSchemaRegistryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest} GetSchemaRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSchemaRegistryRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSchemaRegistryRequest.verify = function verify(message) { + if (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 GetSchemaRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest} GetSchemaRegistryRequest + */ + GetSchemaRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSchemaRegistryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest} message GetSchemaRegistryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSchemaRegistryRequest.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 GetSchemaRegistryRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @instance + * @returns {Object.} JSON object + */ + GetSchemaRegistryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSchemaRegistryRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSchemaRegistryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest"; + }; + + return GetSchemaRegistryRequest; + })(); + + v1.ListSchemaRegistriesRequest = (function() { + + /** + * Properties of a ListSchemaRegistriesRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListSchemaRegistriesRequest + * @property {string|null} [parent] ListSchemaRegistriesRequest parent + */ + + /** + * Constructs a new ListSchemaRegistriesRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListSchemaRegistriesRequest. + * @implements IListSchemaRegistriesRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest=} [properties] Properties to set + */ + function ListSchemaRegistriesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSchemaRegistriesRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @instance + */ + ListSchemaRegistriesRequest.prototype.parent = ""; + + /** + * Creates a new ListSchemaRegistriesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest} ListSchemaRegistriesRequest instance + */ + ListSchemaRegistriesRequest.create = function create(properties) { + return new ListSchemaRegistriesRequest(properties); + }; + + /** + * Encodes the specified ListSchemaRegistriesRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest} message ListSchemaRegistriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaRegistriesRequest.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 ListSchemaRegistriesRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest} message ListSchemaRegistriesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaRegistriesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSchemaRegistriesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest} ListSchemaRegistriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaRegistriesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemaRegistriesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest} ListSchemaRegistriesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaRegistriesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemaRegistriesRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemaRegistriesRequest.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 ListSchemaRegistriesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest} ListSchemaRegistriesRequest + */ + ListSchemaRegistriesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListSchemaRegistriesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest} message ListSchemaRegistriesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemaRegistriesRequest.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 ListSchemaRegistriesRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSchemaRegistriesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemaRegistriesRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemaRegistriesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest"; + }; + + return ListSchemaRegistriesRequest; + })(); + + v1.ListSchemaRegistriesResponse = (function() { + + /** + * Properties of a ListSchemaRegistriesResponse. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListSchemaRegistriesResponse + * @property {Array.|null} [schemaRegistries] ListSchemaRegistriesResponse schemaRegistries + */ + + /** + * Constructs a new ListSchemaRegistriesResponse. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListSchemaRegistriesResponse. + * @implements IListSchemaRegistriesResponse + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse=} [properties] Properties to set + */ + function ListSchemaRegistriesResponse(properties) { + this.schemaRegistries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSchemaRegistriesResponse schemaRegistries. + * @member {Array.} schemaRegistries + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @instance + */ + ListSchemaRegistriesResponse.prototype.schemaRegistries = $util.emptyArray; + + /** + * Creates a new ListSchemaRegistriesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse} ListSchemaRegistriesResponse instance + */ + ListSchemaRegistriesResponse.create = function create(properties) { + return new ListSchemaRegistriesResponse(properties); + }; + + /** + * Encodes the specified ListSchemaRegistriesResponse message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse} message ListSchemaRegistriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaRegistriesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemaRegistries != null && message.schemaRegistries.length) + for (var i = 0; i < message.schemaRegistries.length; ++i) + $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.encode(message.schemaRegistries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListSchemaRegistriesResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse} message ListSchemaRegistriesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaRegistriesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSchemaRegistriesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse} ListSchemaRegistriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaRegistriesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.schemaRegistries && message.schemaRegistries.length)) + message.schemaRegistries = []; + message.schemaRegistries.push($root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemaRegistriesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse} ListSchemaRegistriesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaRegistriesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemaRegistriesResponse message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemaRegistriesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schemaRegistries != null && message.hasOwnProperty("schemaRegistries")) { + if (!Array.isArray(message.schemaRegistries)) + return "schemaRegistries: array expected"; + for (var i = 0; i < message.schemaRegistries.length; ++i) { + var error = $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.verify(message.schemaRegistries[i]); + if (error) + return "schemaRegistries." + error; + } + } + return null; + }; + + /** + * Creates a ListSchemaRegistriesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse} ListSchemaRegistriesResponse + */ + ListSchemaRegistriesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse(); + if (object.schemaRegistries) { + if (!Array.isArray(object.schemaRegistries)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse.schemaRegistries: array expected"); + message.schemaRegistries = []; + for (var i = 0; i < object.schemaRegistries.length; ++i) { + if (typeof object.schemaRegistries[i] !== "object") + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse.schemaRegistries: object expected"); + message.schemaRegistries[i] = $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.fromObject(object.schemaRegistries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListSchemaRegistriesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse} message ListSchemaRegistriesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemaRegistriesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.schemaRegistries = []; + if (message.schemaRegistries && message.schemaRegistries.length) { + object.schemaRegistries = []; + for (var j = 0; j < message.schemaRegistries.length; ++j) + object.schemaRegistries[j] = $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.toObject(message.schemaRegistries[j], options); + } + return object; + }; + + /** + * Converts this ListSchemaRegistriesResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @instance + * @returns {Object.} JSON object + */ + ListSchemaRegistriesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemaRegistriesResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemaRegistriesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse"; + }; + + return ListSchemaRegistriesResponse; + })(); + + v1.CreateSchemaRegistryRequest = (function() { + + /** + * Properties of a CreateSchemaRegistryRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ICreateSchemaRegistryRequest + * @property {string|null} [parent] CreateSchemaRegistryRequest parent + * @property {string|null} [schemaRegistryId] CreateSchemaRegistryRequest schemaRegistryId + * @property {google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry|null} [schemaRegistry] CreateSchemaRegistryRequest schemaRegistry + */ + + /** + * Constructs a new CreateSchemaRegistryRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a CreateSchemaRegistryRequest. + * @implements ICreateSchemaRegistryRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest=} [properties] Properties to set + */ + function CreateSchemaRegistryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateSchemaRegistryRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @instance + */ + CreateSchemaRegistryRequest.prototype.parent = ""; + + /** + * CreateSchemaRegistryRequest schemaRegistryId. + * @member {string} schemaRegistryId + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @instance + */ + CreateSchemaRegistryRequest.prototype.schemaRegistryId = ""; + + /** + * CreateSchemaRegistryRequest schemaRegistry. + * @member {google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry|null|undefined} schemaRegistry + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @instance + */ + CreateSchemaRegistryRequest.prototype.schemaRegistry = null; + + /** + * Creates a new CreateSchemaRegistryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest} CreateSchemaRegistryRequest instance + */ + CreateSchemaRegistryRequest.create = function create(properties) { + return new CreateSchemaRegistryRequest(properties); + }; + + /** + * Encodes the specified CreateSchemaRegistryRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest} message CreateSchemaRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaRegistryRequest.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.schemaRegistryId != null && Object.hasOwnProperty.call(message, "schemaRegistryId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaRegistryId); + if (message.schemaRegistry != null && Object.hasOwnProperty.call(message, "schemaRegistry")) + $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.encode(message.schemaRegistry, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateSchemaRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest} message CreateSchemaRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateSchemaRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateSchemaRegistryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest} CreateSchemaRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaRegistryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.schemaRegistryId = reader.string(); + break; + } + case 3: { + message.schemaRegistry = $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateSchemaRegistryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest} CreateSchemaRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateSchemaRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateSchemaRegistryRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateSchemaRegistryRequest.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.schemaRegistryId != null && message.hasOwnProperty("schemaRegistryId")) + if (!$util.isString(message.schemaRegistryId)) + return "schemaRegistryId: string expected"; + if (message.schemaRegistry != null && message.hasOwnProperty("schemaRegistry")) { + var error = $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.verify(message.schemaRegistry); + if (error) + return "schemaRegistry." + error; + } + return null; + }; + + /** + * Creates a CreateSchemaRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest} CreateSchemaRegistryRequest + */ + CreateSchemaRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.schemaRegistryId != null) + message.schemaRegistryId = String(object.schemaRegistryId); + if (object.schemaRegistry != null) { + if (typeof object.schemaRegistry !== "object") + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest.schemaRegistry: object expected"); + message.schemaRegistry = $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.fromObject(object.schemaRegistry); + } + return message; + }; + + /** + * Creates a plain object from a CreateSchemaRegistryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest} message CreateSchemaRegistryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateSchemaRegistryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.schemaRegistryId = ""; + object.schemaRegistry = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.schemaRegistryId != null && message.hasOwnProperty("schemaRegistryId")) + object.schemaRegistryId = message.schemaRegistryId; + if (message.schemaRegistry != null && message.hasOwnProperty("schemaRegistry")) + object.schemaRegistry = $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.toObject(message.schemaRegistry, options); + return object; + }; + + /** + * Converts this CreateSchemaRegistryRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @instance + * @returns {Object.} JSON object + */ + CreateSchemaRegistryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateSchemaRegistryRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateSchemaRegistryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest"; + }; + + return CreateSchemaRegistryRequest; + })(); + + v1.DeleteSchemaRegistryRequest = (function() { + + /** + * Properties of a DeleteSchemaRegistryRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IDeleteSchemaRegistryRequest + * @property {string|null} [name] DeleteSchemaRegistryRequest name + */ + + /** + * Constructs a new DeleteSchemaRegistryRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a DeleteSchemaRegistryRequest. + * @implements IDeleteSchemaRegistryRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest=} [properties] Properties to set + */ + function DeleteSchemaRegistryRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSchemaRegistryRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @instance + */ + DeleteSchemaRegistryRequest.prototype.name = ""; + + /** + * Creates a new DeleteSchemaRegistryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest} DeleteSchemaRegistryRequest instance + */ + DeleteSchemaRegistryRequest.create = function create(properties) { + return new DeleteSchemaRegistryRequest(properties); + }; + + /** + * Encodes the specified DeleteSchemaRegistryRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest} message DeleteSchemaRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaRegistryRequest.encode = function encode(message, writer) { + 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 DeleteSchemaRegistryRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest} message DeleteSchemaRegistryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaRegistryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSchemaRegistryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest} DeleteSchemaRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaRegistryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSchemaRegistryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest} DeleteSchemaRegistryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaRegistryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSchemaRegistryRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSchemaRegistryRequest.verify = function verify(message) { + if (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 DeleteSchemaRegistryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest} DeleteSchemaRegistryRequest + */ + DeleteSchemaRegistryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSchemaRegistryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest} message DeleteSchemaRegistryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSchemaRegistryRequest.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 DeleteSchemaRegistryRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSchemaRegistryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSchemaRegistryRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSchemaRegistryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest"; + }; + + return DeleteSchemaRegistryRequest; + })(); + + v1.GetContextRequest = (function() { + + /** + * Properties of a GetContextRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IGetContextRequest + * @property {string|null} [name] GetContextRequest name + */ + + /** + * Constructs a new GetContextRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a GetContextRequest. + * @implements IGetContextRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest=} [properties] Properties to set + */ + function GetContextRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetContextRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @instance + */ + GetContextRequest.prototype.name = ""; + + /** + * Creates a new GetContextRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetContextRequest} GetContextRequest instance + */ + GetContextRequest.create = function create(properties) { + return new GetContextRequest(properties); + }; + + /** + * Encodes the specified GetContextRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetContextRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest} message GetContextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetContextRequest.encode = function encode(message, writer) { + 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 GetContextRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetContextRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest} message GetContextRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetContextRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetContextRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetContextRequest} GetContextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetContextRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetContextRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetContextRequest} GetContextRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetContextRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetContextRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetContextRequest.verify = function verify(message) { + if (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 GetContextRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetContextRequest} GetContextRequest + */ + GetContextRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetContextRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.GetContextRequest} message GetContextRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetContextRequest.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 GetContextRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @instance + * @returns {Object.} JSON object + */ + GetContextRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetContextRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetContextRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetContextRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.GetContextRequest"; + }; + + return GetContextRequest; + })(); + + v1.ListContextsRequest = (function() { + + /** + * Properties of a ListContextsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListContextsRequest + * @property {string|null} [parent] ListContextsRequest parent + */ + + /** + * Constructs a new ListContextsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListContextsRequest. + * @implements IListContextsRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest=} [properties] Properties to set + */ + function ListContextsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListContextsRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @instance + */ + ListContextsRequest.prototype.parent = ""; + + /** + * Creates a new ListContextsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest} ListContextsRequest instance + */ + ListContextsRequest.create = function create(properties) { + return new ListContextsRequest(properties); + }; + + /** + * Encodes the specified ListContextsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest} message ListContextsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContextsRequest.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 ListContextsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest} message ListContextsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListContextsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListContextsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest} ListContextsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContextsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListContextsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest} ListContextsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListContextsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListContextsRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListContextsRequest.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 ListContextsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest} ListContextsRequest + */ + ListContextsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListContextsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest} message ListContextsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListContextsRequest.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 ListContextsRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @instance + * @returns {Object.} JSON object + */ + ListContextsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListContextsRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListContextsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest"; + }; + + return ListContextsRequest; + })(); + + v1.GetSchemaRequest = (function() { + + /** + * Properties of a GetSchemaRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IGetSchemaRequest + * @property {string|null} [name] GetSchemaRequest name + * @property {string|null} [subject] GetSchemaRequest subject + */ + + /** + * Constructs a new GetSchemaRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a GetSchemaRequest. + * @implements IGetSchemaRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest=} [properties] Properties to set + */ + function GetSchemaRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSchemaRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.name = ""; + + /** + * GetSchemaRequest subject. + * @member {string|null|undefined} subject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @instance + */ + GetSchemaRequest.prototype.subject = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GetSchemaRequest.prototype, "_subject", { + get: $util.oneOfGetter($oneOfFields = ["subject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetSchemaRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest} GetSchemaRequest instance + */ + GetSchemaRequest.create = function create(properties) { + return new GetSchemaRequest(properties); + }; + + /** + * Encodes the specified GetSchemaRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + return writer; + }; + + /** + * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest} GetSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.subject = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest} GetSchemaRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSchemaRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSchemaRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + properties._subject = 1; + if (!$util.isString(message.subject)) + return "subject: string expected"; + } + return null; + }; + + /** + * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest} GetSchemaRequest + */ + GetSchemaRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.subject != null) + message.subject = String(object.subject); + return message; + }; + + /** + * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest} message GetSchemaRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSchemaRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.subject != null && message.hasOwnProperty("subject")) { + object.subject = message.subject; + if (options.oneofs) + object._subject = "subject"; + } + return object; + }; + + /** + * Converts this GetSchemaRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @instance + * @returns {Object.} JSON object + */ + GetSchemaRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSchemaRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest"; + }; + + return GetSchemaRequest; + })(); + + v1.ListSchemaTypesRequest = (function() { + + /** + * Properties of a ListSchemaTypesRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListSchemaTypesRequest + * @property {string|null} [parent] ListSchemaTypesRequest parent + */ + + /** + * Constructs a new ListSchemaTypesRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListSchemaTypesRequest. + * @implements IListSchemaTypesRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest=} [properties] Properties to set + */ + function ListSchemaTypesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSchemaTypesRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @instance + */ + ListSchemaTypesRequest.prototype.parent = ""; + + /** + * Creates a new ListSchemaTypesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest} ListSchemaTypesRequest instance + */ + ListSchemaTypesRequest.create = function create(properties) { + return new ListSchemaTypesRequest(properties); + }; + + /** + * Encodes the specified ListSchemaTypesRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest} message ListSchemaTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaTypesRequest.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 ListSchemaTypesRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest} message ListSchemaTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSchemaTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest} ListSchemaTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaTypesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemaTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest} ListSchemaTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemaTypesRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemaTypesRequest.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 ListSchemaTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest} ListSchemaTypesRequest + */ + ListSchemaTypesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListSchemaTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest} message ListSchemaTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemaTypesRequest.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 ListSchemaTypesRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListSchemaTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemaTypesRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemaTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest"; + }; + + return ListSchemaTypesRequest; + })(); + + v1.ListSchemaVersionsRequest = (function() { + + /** + * Properties of a ListSchemaVersionsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListSchemaVersionsRequest + * @property {string|null} [parent] ListSchemaVersionsRequest parent + * @property {string|null} [subject] ListSchemaVersionsRequest subject + * @property {boolean|null} [deleted] ListSchemaVersionsRequest deleted + */ + + /** + * Constructs a new ListSchemaVersionsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListSchemaVersionsRequest. + * @implements IListSchemaVersionsRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest=} [properties] Properties to set + */ + function ListSchemaVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSchemaVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @instance + */ + ListSchemaVersionsRequest.prototype.parent = ""; + + /** + * ListSchemaVersionsRequest subject. + * @member {string|null|undefined} subject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @instance + */ + ListSchemaVersionsRequest.prototype.subject = null; + + /** + * ListSchemaVersionsRequest deleted. + * @member {boolean|null|undefined} deleted + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @instance + */ + ListSchemaVersionsRequest.prototype.deleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListSchemaVersionsRequest.prototype, "_subject", { + get: $util.oneOfGetter($oneOfFields = ["subject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListSchemaVersionsRequest.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListSchemaVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest} ListSchemaVersionsRequest instance + */ + ListSchemaVersionsRequest.create = function create(properties) { + return new ListSchemaVersionsRequest(properties); + }; + + /** + * Encodes the specified ListSchemaVersionsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest} message ListSchemaVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaVersionsRequest.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.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified ListSchemaVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest} message ListSchemaVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSchemaVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSchemaVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest} ListSchemaVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaVersionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.subject = reader.string(); + break; + } + case 3: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSchemaVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest} ListSchemaVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSchemaVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSchemaVersionsRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSchemaVersionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + properties._subject = 1; + if (!$util.isString(message.subject)) + return "subject: string expected"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + } + return null; + }; + + /** + * Creates a ListSchemaVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest} ListSchemaVersionsRequest + */ + ListSchemaVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.subject != null) + message.subject = String(object.subject); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a ListSchemaVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest} message ListSchemaVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSchemaVersionsRequest.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; + if (message.subject != null && message.hasOwnProperty("subject")) { + object.subject = message.subject; + if (options.oneofs) + object._subject = "subject"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } + return object; + }; + + /** + * Converts this ListSchemaVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSchemaVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSchemaVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSchemaVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest"; + }; + + return ListSchemaVersionsRequest; + })(); + + v1.ListSubjectsRequest = (function() { + + /** + * Properties of a ListSubjectsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListSubjectsRequest + * @property {string|null} [parent] ListSubjectsRequest parent + * @property {string|null} [subjectPrefix] ListSubjectsRequest subjectPrefix + * @property {boolean|null} [deleted] ListSubjectsRequest deleted + */ + + /** + * Constructs a new ListSubjectsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListSubjectsRequest. + * @implements IListSubjectsRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest=} [properties] Properties to set + */ + function ListSubjectsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSubjectsRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @instance + */ + ListSubjectsRequest.prototype.parent = ""; + + /** + * ListSubjectsRequest subjectPrefix. + * @member {string|null|undefined} subjectPrefix + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @instance + */ + ListSubjectsRequest.prototype.subjectPrefix = null; + + /** + * ListSubjectsRequest deleted. + * @member {boolean|null|undefined} deleted + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @instance + */ + ListSubjectsRequest.prototype.deleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListSubjectsRequest.prototype, "_subjectPrefix", { + get: $util.oneOfGetter($oneOfFields = ["subjectPrefix"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListSubjectsRequest.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListSubjectsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest} ListSubjectsRequest instance + */ + ListSubjectsRequest.create = function create(properties) { + return new ListSubjectsRequest(properties); + }; + + /** + * Encodes the specified ListSubjectsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest} message ListSubjectsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSubjectsRequest.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.subjectPrefix != null && Object.hasOwnProperty.call(message, "subjectPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subjectPrefix); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified ListSubjectsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest} message ListSubjectsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSubjectsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSubjectsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest} ListSubjectsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSubjectsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.subjectPrefix = reader.string(); + break; + } + case 3: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSubjectsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest} ListSubjectsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSubjectsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSubjectsRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSubjectsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.subjectPrefix != null && message.hasOwnProperty("subjectPrefix")) { + properties._subjectPrefix = 1; + if (!$util.isString(message.subjectPrefix)) + return "subjectPrefix: string expected"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + } + return null; + }; + + /** + * Creates a ListSubjectsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest} ListSubjectsRequest + */ + ListSubjectsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.subjectPrefix != null) + message.subjectPrefix = String(object.subjectPrefix); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a ListSubjectsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest} message ListSubjectsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSubjectsRequest.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; + if (message.subjectPrefix != null && message.hasOwnProperty("subjectPrefix")) { + object.subjectPrefix = message.subjectPrefix; + if (options.oneofs) + object._subjectPrefix = "subjectPrefix"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } + return object; + }; + + /** + * Converts this ListSubjectsRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @instance + * @returns {Object.} JSON object + */ + ListSubjectsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSubjectsRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSubjectsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest"; + }; + + return ListSubjectsRequest; + })(); + + v1.ListSubjectsBySchemaIdRequest = (function() { + + /** + * Properties of a ListSubjectsBySchemaIdRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListSubjectsBySchemaIdRequest + * @property {string|null} [parent] ListSubjectsBySchemaIdRequest parent + * @property {string|null} [subject] ListSubjectsBySchemaIdRequest subject + * @property {boolean|null} [deleted] ListSubjectsBySchemaIdRequest deleted + */ + + /** + * Constructs a new ListSubjectsBySchemaIdRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListSubjectsBySchemaIdRequest. + * @implements IListSubjectsBySchemaIdRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest=} [properties] Properties to set + */ + function ListSubjectsBySchemaIdRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListSubjectsBySchemaIdRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @instance + */ + ListSubjectsBySchemaIdRequest.prototype.parent = ""; + + /** + * ListSubjectsBySchemaIdRequest subject. + * @member {string|null|undefined} subject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @instance + */ + ListSubjectsBySchemaIdRequest.prototype.subject = null; + + /** + * ListSubjectsBySchemaIdRequest deleted. + * @member {boolean|null|undefined} deleted + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @instance + */ + ListSubjectsBySchemaIdRequest.prototype.deleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListSubjectsBySchemaIdRequest.prototype, "_subject", { + get: $util.oneOfGetter($oneOfFields = ["subject"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListSubjectsBySchemaIdRequest.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListSubjectsBySchemaIdRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest} ListSubjectsBySchemaIdRequest instance + */ + ListSubjectsBySchemaIdRequest.create = function create(properties) { + return new ListSubjectsBySchemaIdRequest(properties); + }; + + /** + * Encodes the specified ListSubjectsBySchemaIdRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest} message ListSubjectsBySchemaIdRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSubjectsBySchemaIdRequest.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.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified ListSubjectsBySchemaIdRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest} message ListSubjectsBySchemaIdRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListSubjectsBySchemaIdRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListSubjectsBySchemaIdRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest} ListSubjectsBySchemaIdRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSubjectsBySchemaIdRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.subject = reader.string(); + break; + } + case 3: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListSubjectsBySchemaIdRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest} ListSubjectsBySchemaIdRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListSubjectsBySchemaIdRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListSubjectsBySchemaIdRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListSubjectsBySchemaIdRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + properties._subject = 1; + if (!$util.isString(message.subject)) + return "subject: string expected"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + } + return null; + }; + + /** + * Creates a ListSubjectsBySchemaIdRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest} ListSubjectsBySchemaIdRequest + */ + ListSubjectsBySchemaIdRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.subject != null) + message.subject = String(object.subject); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a ListSubjectsBySchemaIdRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest} message ListSubjectsBySchemaIdRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListSubjectsBySchemaIdRequest.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; + if (message.subject != null && message.hasOwnProperty("subject")) { + object.subject = message.subject; + if (options.oneofs) + object._subject = "subject"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } + return object; + }; + + /** + * Converts this ListSubjectsBySchemaIdRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @instance + * @returns {Object.} JSON object + */ + ListSubjectsBySchemaIdRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListSubjectsBySchemaIdRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListSubjectsBySchemaIdRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest"; + }; + + return ListSubjectsBySchemaIdRequest; + })(); + + v1.ListVersionsRequest = (function() { + + /** + * Properties of a ListVersionsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListVersionsRequest + * @property {string|null} [parent] ListVersionsRequest parent + * @property {boolean|null} [deleted] ListVersionsRequest deleted + */ + + /** + * Constructs a new ListVersionsRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListVersionsRequest. + * @implements IListVersionsRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest=} [properties] Properties to set + */ + function ListVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.parent = ""; + + /** + * ListVersionsRequest deleted. + * @member {boolean|null|undefined} deleted + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @instance + */ + ListVersionsRequest.prototype.deleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(ListVersionsRequest.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ListVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest} ListVersionsRequest instance + */ + ListVersionsRequest.create = function create(properties) { + return new ListVersionsRequest(properties); + }; + + /** + * Encodes the specified ListVersionsRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsRequest.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.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified ListVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest} message ListVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest} ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest} ListVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListVersionsRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListVersionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + } + return null; + }; + + /** + * Creates a ListVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest} ListVersionsRequest + */ + ListVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a ListVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest} message ListVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListVersionsRequest.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; + if (message.deleted != null && message.hasOwnProperty("deleted")) { + object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } + return object; + }; + + /** + * Converts this ListVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest"; + }; + + return ListVersionsRequest; + })(); + + v1.DeleteSubjectRequest = (function() { + + /** + * Properties of a DeleteSubjectRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IDeleteSubjectRequest + * @property {string|null} [name] DeleteSubjectRequest name + * @property {boolean|null} [permanent] DeleteSubjectRequest permanent + */ + + /** + * Constructs a new DeleteSubjectRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a DeleteSubjectRequest. + * @implements IDeleteSubjectRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest=} [properties] Properties to set + */ + function DeleteSubjectRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSubjectRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @instance + */ + DeleteSubjectRequest.prototype.name = ""; + + /** + * DeleteSubjectRequest permanent. + * @member {boolean|null|undefined} permanent + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @instance + */ + DeleteSubjectRequest.prototype.permanent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteSubjectRequest.prototype, "_permanent", { + get: $util.oneOfGetter($oneOfFields = ["permanent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeleteSubjectRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest} DeleteSubjectRequest instance + */ + DeleteSubjectRequest.create = function create(properties) { + return new DeleteSubjectRequest(properties); + }; + + /** + * Encodes the specified DeleteSubjectRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest} message DeleteSubjectRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSubjectRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.permanent != null && Object.hasOwnProperty.call(message, "permanent")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.permanent); + return writer; + }; + + /** + * Encodes the specified DeleteSubjectRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest} message DeleteSubjectRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSubjectRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSubjectRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest} DeleteSubjectRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSubjectRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.permanent = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSubjectRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest} DeleteSubjectRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSubjectRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSubjectRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSubjectRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.permanent != null && message.hasOwnProperty("permanent")) { + properties._permanent = 1; + if (typeof message.permanent !== "boolean") + return "permanent: boolean expected"; + } + return null; + }; + + /** + * Creates a DeleteSubjectRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest} DeleteSubjectRequest + */ + DeleteSubjectRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.permanent != null) + message.permanent = Boolean(object.permanent); + return message; + }; + + /** + * Creates a plain object from a DeleteSubjectRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest} message DeleteSubjectRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSubjectRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.permanent != null && message.hasOwnProperty("permanent")) { + object.permanent = message.permanent; + if (options.oneofs) + object._permanent = "permanent"; + } + return object; + }; + + /** + * Converts this DeleteSubjectRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSubjectRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSubjectRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSubjectRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest"; + }; + + return DeleteSubjectRequest; + })(); + + v1.GetVersionRequest = (function() { + + /** + * Properties of a GetVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IGetVersionRequest + * @property {string|null} [name] GetVersionRequest name + * @property {boolean|null} [deleted] GetVersionRequest deleted + */ + + /** + * Constructs a new GetVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a GetVersionRequest. + * @implements IGetVersionRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest=} [properties] Properties to set + */ + function GetVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetVersionRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.name = ""; + + /** + * GetVersionRequest deleted. + * @member {boolean|null|undefined} deleted + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @instance + */ + GetVersionRequest.prototype.deleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GetVersionRequest.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest} GetVersionRequest instance + */ + GetVersionRequest.create = function create(properties) { + return new GetVersionRequest(properties); + }; + + /** + * Encodes the specified GetVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified GetVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest} message GetVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest} GetVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetVersionRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + } + return null; + }; + + /** + * Creates a GetVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest} GetVersionRequest + */ + GetVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a GetVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest} message GetVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.deleted != null && message.hasOwnProperty("deleted")) { + object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } + return object; + }; + + /** + * Converts this GetVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @instance + * @returns {Object.} JSON object + */ + GetVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetVersionRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest"; + }; + + return GetVersionRequest; + })(); + + v1.CreateVersionRequest = (function() { + + /** + * Properties of a CreateVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ICreateVersionRequest + * @property {string|null} [parent] CreateVersionRequest parent + * @property {number|null} [version] CreateVersionRequest version + * @property {number|null} [id] CreateVersionRequest id + * @property {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null} [schemaType] CreateVersionRequest schemaType + * @property {string|null} [schema] CreateVersionRequest schema + * @property {Array.|null} [references] CreateVersionRequest references + * @property {boolean|null} [normalize] CreateVersionRequest normalize + */ + + /** + * Constructs a new CreateVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a CreateVersionRequest. + * @implements ICreateVersionRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest=} [properties] Properties to set + */ + function CreateVersionRequest(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVersionRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.parent = ""; + + /** + * CreateVersionRequest version. + * @member {number|null|undefined} version + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.version = null; + + /** + * CreateVersionRequest id. + * @member {number|null|undefined} id + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.id = null; + + /** + * CreateVersionRequest schemaType. + * @member {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null|undefined} schemaType + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.schemaType = null; + + /** + * CreateVersionRequest schema. + * @member {string} schema + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.schema = ""; + + /** + * CreateVersionRequest references. + * @member {Array.} references + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.references = $util.emptyArray; + + /** + * CreateVersionRequest normalize. + * @member {boolean|null|undefined} normalize + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + */ + CreateVersionRequest.prototype.normalize = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreateVersionRequest.prototype, "_version", { + get: $util.oneOfGetter($oneOfFields = ["version"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreateVersionRequest.prototype, "_id", { + get: $util.oneOfGetter($oneOfFields = ["id"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreateVersionRequest.prototype, "_schemaType", { + get: $util.oneOfGetter($oneOfFields = ["schemaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CreateVersionRequest.prototype, "_normalize", { + get: $util.oneOfGetter($oneOfFields = ["normalize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CreateVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest} CreateVersionRequest instance + */ + CreateVersionRequest.create = function create(properties) { + return new CreateVersionRequest(properties); + }; + + /** + * Encodes the specified CreateVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionRequest.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.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.version); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.id); + if (message.schemaType != null && Object.hasOwnProperty.call(message, "schemaType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.schemaType); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.schema); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.encode(message.references[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.normalize != null && Object.hasOwnProperty.call(message, "normalize")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.normalize); + return writer; + }; + + /** + * Encodes the specified CreateVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest} message CreateVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest} CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.version = reader.int32(); + break; + } + case 3: { + message.id = reader.int32(); + break; + } + case 4: { + message.schemaType = reader.int32(); + break; + } + case 5: { + message.schema = reader.string(); + break; + } + case 6: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.decode(reader, reader.uint32())); + break; + } + case 7: { + message.normalize = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest} CreateVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVersionRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.version != null && message.hasOwnProperty("version")) { + properties._version = 1; + if (!$util.isInteger(message.version)) + return "version: integer expected"; + } + if (message.id != null && message.hasOwnProperty("id")) { + properties._id = 1; + if (!$util.isInteger(message.id)) + return "id: integer expected"; + } + if (message.schemaType != null && message.hasOwnProperty("schemaType")) { + properties._schemaType = 1; + switch (message.schemaType) { + default: + return "schemaType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + properties._normalize = 1; + if (typeof message.normalize !== "boolean") + return "normalize: boolean expected"; + } + return null; + }; + + /** + * Creates a CreateVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest} CreateVersionRequest + */ + CreateVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.version != null) + message.version = object.version | 0; + if (object.id != null) + message.id = object.id | 0; + switch (object.schemaType) { + default: + if (typeof object.schemaType === "number") { + message.schemaType = object.schemaType; + break; + } + break; + case "SCHEMA_TYPE_UNSPECIFIED": + case 0: + message.schemaType = 0; + break; + case "AVRO": + case 1: + message.schemaType = 1; + break; + case "JSON": + case 2: + message.schemaType = 2; + break; + case "PROTOBUF": + case 3: + message.schemaType = 3; + break; + } + if (object.schema != null) + message.schema = String(object.schema); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest.references: object expected"); + message.references[i] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.fromObject(object.references[i]); + } + } + if (object.normalize != null) + message.normalize = Boolean(object.normalize); + return message; + }; + + /** + * Creates a plain object from a CreateVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest} message CreateVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.parent = ""; + object.schema = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.version != null && message.hasOwnProperty("version")) { + object.version = message.version; + if (options.oneofs) + object._version = "version"; + } + if (message.id != null && message.hasOwnProperty("id")) { + object.id = message.id; + if (options.oneofs) + object._id = "id"; + } + if (message.schemaType != null && message.hasOwnProperty("schemaType")) { + object.schemaType = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] === undefined ? message.schemaType : $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] : message.schemaType; + if (options.oneofs) + object._schemaType = "schemaType"; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.toObject(message.references[j], options); + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + object.normalize = message.normalize; + if (options.oneofs) + object._normalize = "normalize"; + } + return object; + }; + + /** + * Converts this CreateVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVersionRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest"; + }; + + return CreateVersionRequest; + })(); + + v1.CreateVersionResponse = (function() { + + /** + * Properties of a CreateVersionResponse. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ICreateVersionResponse + * @property {number|null} [id] CreateVersionResponse id + */ + + /** + * Constructs a new CreateVersionResponse. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a CreateVersionResponse. + * @implements ICreateVersionResponse + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse=} [properties] Properties to set + */ + function CreateVersionResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateVersionResponse id. + * @member {number} id + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @instance + */ + CreateVersionResponse.prototype.id = 0; + + /** + * Creates a new CreateVersionResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse} CreateVersionResponse instance + */ + CreateVersionResponse.create = function create(properties) { + return new CreateVersionResponse(properties); + }; + + /** + * Encodes the specified CreateVersionResponse message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse} message CreateVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); + return writer; + }; + + /** + * Encodes the specified CreateVersionResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse} message CreateVersionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateVersionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateVersionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse} CreateVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.id = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateVersionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse} CreateVersionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateVersionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateVersionResponse message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateVersionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isInteger(message.id)) + return "id: integer expected"; + return null; + }; + + /** + * Creates a CreateVersionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse} CreateVersionResponse + */ + CreateVersionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse(); + if (object.id != null) + message.id = object.id | 0; + return message; + }; + + /** + * Creates a plain object from a CreateVersionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse} message CreateVersionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateVersionResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.id = 0; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + return object; + }; + + /** + * Converts this CreateVersionResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @instance + * @returns {Object.} JSON object + */ + CreateVersionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateVersionResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateVersionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse"; + }; + + return CreateVersionResponse; + })(); + + v1.LookupVersionRequest = (function() { + + /** + * Properties of a LookupVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ILookupVersionRequest + * @property {string|null} [parent] LookupVersionRequest parent + * @property {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null} [schemaType] LookupVersionRequest schemaType + * @property {string|null} [schema] LookupVersionRequest schema + * @property {Array.|null} [references] LookupVersionRequest references + * @property {boolean|null} [normalize] LookupVersionRequest normalize + * @property {boolean|null} [deleted] LookupVersionRequest deleted + */ + + /** + * Constructs a new LookupVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a LookupVersionRequest. + * @implements ILookupVersionRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest=} [properties] Properties to set + */ + function LookupVersionRequest(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LookupVersionRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @instance + */ + LookupVersionRequest.prototype.parent = ""; + + /** + * LookupVersionRequest schemaType. + * @member {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null|undefined} schemaType + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @instance + */ + LookupVersionRequest.prototype.schemaType = null; + + /** + * LookupVersionRequest schema. + * @member {string} schema + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @instance + */ + LookupVersionRequest.prototype.schema = ""; + + /** + * LookupVersionRequest references. + * @member {Array.} references + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @instance + */ + LookupVersionRequest.prototype.references = $util.emptyArray; + + /** + * LookupVersionRequest normalize. + * @member {boolean|null|undefined} normalize + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @instance + */ + LookupVersionRequest.prototype.normalize = null; + + /** + * LookupVersionRequest deleted. + * @member {boolean|null|undefined} deleted + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @instance + */ + LookupVersionRequest.prototype.deleted = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LookupVersionRequest.prototype, "_schemaType", { + get: $util.oneOfGetter($oneOfFields = ["schemaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LookupVersionRequest.prototype, "_normalize", { + get: $util.oneOfGetter($oneOfFields = ["normalize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(LookupVersionRequest.prototype, "_deleted", { + get: $util.oneOfGetter($oneOfFields = ["deleted"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LookupVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest} LookupVersionRequest instance + */ + LookupVersionRequest.create = function create(properties) { + return new LookupVersionRequest(properties); + }; + + /** + * Encodes the specified LookupVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest} message LookupVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookupVersionRequest.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.schemaType != null && Object.hasOwnProperty.call(message, "schemaType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.schemaType); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.encode(message.references[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.normalize != null && Object.hasOwnProperty.call(message, "normalize")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.normalize); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified LookupVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest} message LookupVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LookupVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LookupVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest} LookupVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookupVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.schemaType = reader.int32(); + break; + } + case 3: { + message.schema = reader.string(); + break; + } + case 4: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.decode(reader, reader.uint32())); + break; + } + case 5: { + message.normalize = reader.bool(); + break; + } + case 6: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LookupVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest} LookupVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LookupVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LookupVersionRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LookupVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) { + properties._schemaType = 1; + switch (message.schemaType) { + default: + return "schemaType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + properties._normalize = 1; + if (typeof message.normalize !== "boolean") + return "normalize: boolean expected"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + properties._deleted = 1; + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + } + return null; + }; + + /** + * Creates a LookupVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest} LookupVersionRequest + */ + LookupVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.schemaType) { + default: + if (typeof object.schemaType === "number") { + message.schemaType = object.schemaType; + break; + } + break; + case "SCHEMA_TYPE_UNSPECIFIED": + case 0: + message.schemaType = 0; + break; + case "AVRO": + case 1: + message.schemaType = 1; + break; + case "JSON": + case 2: + message.schemaType = 2; + break; + case "PROTOBUF": + case 3: + message.schemaType = 3; + break; + } + if (object.schema != null) + message.schema = String(object.schema); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest.references: object expected"); + message.references[i] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.fromObject(object.references[i]); + } + } + if (object.normalize != null) + message.normalize = Boolean(object.normalize); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from a LookupVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest} message LookupVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LookupVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.parent = ""; + object.schema = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) { + object.schemaType = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] === undefined ? message.schemaType : $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] : message.schemaType; + if (options.oneofs) + object._schemaType = "schemaType"; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.toObject(message.references[j], options); + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + object.normalize = message.normalize; + if (options.oneofs) + object._normalize = "normalize"; + } + if (message.deleted != null && message.hasOwnProperty("deleted")) { + object.deleted = message.deleted; + if (options.oneofs) + object._deleted = "deleted"; + } + return object; + }; + + /** + * Converts this LookupVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @instance + * @returns {Object.} JSON object + */ + LookupVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LookupVersionRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LookupVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest"; + }; + + return LookupVersionRequest; + })(); + + v1.DeleteVersionRequest = (function() { + + /** + * Properties of a DeleteVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IDeleteVersionRequest + * @property {string|null} [name] DeleteVersionRequest name + * @property {boolean|null} [permanent] DeleteVersionRequest permanent + */ + + /** + * Constructs a new DeleteVersionRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a DeleteVersionRequest. + * @implements IDeleteVersionRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest=} [properties] Properties to set + */ + function DeleteVersionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteVersionRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.name = ""; + + /** + * DeleteVersionRequest permanent. + * @member {boolean|null|undefined} permanent + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @instance + */ + DeleteVersionRequest.prototype.permanent = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(DeleteVersionRequest.prototype, "_permanent", { + get: $util.oneOfGetter($oneOfFields = ["permanent"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeleteVersionRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest} DeleteVersionRequest instance + */ + DeleteVersionRequest.create = function create(properties) { + return new DeleteVersionRequest(properties); + }; + + /** + * Encodes the specified DeleteVersionRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.permanent != null && Object.hasOwnProperty.call(message, "permanent")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.permanent); + return writer; + }; + + /** + * Encodes the specified DeleteVersionRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest} message DeleteVersionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteVersionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.permanent = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteVersionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest} DeleteVersionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteVersionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteVersionRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteVersionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.permanent != null && message.hasOwnProperty("permanent")) { + properties._permanent = 1; + if (typeof message.permanent !== "boolean") + return "permanent: boolean expected"; + } + return null; + }; + + /** + * Creates a DeleteVersionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest} DeleteVersionRequest + */ + DeleteVersionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.permanent != null) + message.permanent = Boolean(object.permanent); + return message; + }; + + /** + * Creates a plain object from a DeleteVersionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest} message DeleteVersionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteVersionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.permanent != null && message.hasOwnProperty("permanent")) { + object.permanent = message.permanent; + if (options.oneofs) + object._permanent = "permanent"; + } + return object; + }; + + /** + * Converts this DeleteVersionRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteVersionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteVersionRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteVersionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest"; + }; + + return DeleteVersionRequest; + })(); + + v1.ListReferencedSchemasRequest = (function() { + + /** + * Properties of a ListReferencedSchemasRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IListReferencedSchemasRequest + * @property {string|null} [parent] ListReferencedSchemasRequest parent + */ + + /** + * Constructs a new ListReferencedSchemasRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a ListReferencedSchemasRequest. + * @implements IListReferencedSchemasRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest=} [properties] Properties to set + */ + function ListReferencedSchemasRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReferencedSchemasRequest parent. + * @member {string} parent + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @instance + */ + ListReferencedSchemasRequest.prototype.parent = ""; + + /** + * Creates a new ListReferencedSchemasRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest} ListReferencedSchemasRequest instance + */ + ListReferencedSchemasRequest.create = function create(properties) { + return new ListReferencedSchemasRequest(properties); + }; + + /** + * Encodes the specified ListReferencedSchemasRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest} message ListReferencedSchemasRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReferencedSchemasRequest.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 ListReferencedSchemasRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest} message ListReferencedSchemasRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReferencedSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReferencedSchemasRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest} ListReferencedSchemasRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReferencedSchemasRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListReferencedSchemasRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest} ListReferencedSchemasRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReferencedSchemasRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReferencedSchemasRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReferencedSchemasRequest.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 ListReferencedSchemasRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest} ListReferencedSchemasRequest + */ + ListReferencedSchemasRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListReferencedSchemasRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest} message ListReferencedSchemasRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReferencedSchemasRequest.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 ListReferencedSchemasRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @instance + * @returns {Object.} JSON object + */ + ListReferencedSchemasRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListReferencedSchemasRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReferencedSchemasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest"; + }; + + return ListReferencedSchemasRequest; + })(); + + v1.CheckCompatibilityRequest = (function() { + + /** + * Properties of a CheckCompatibilityRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ICheckCompatibilityRequest + * @property {string|null} [name] CheckCompatibilityRequest name + * @property {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null} [schemaType] CheckCompatibilityRequest schemaType + * @property {string|null} [schema] CheckCompatibilityRequest schema + * @property {Array.|null} [references] CheckCompatibilityRequest references + * @property {boolean|null} [verbose] CheckCompatibilityRequest verbose + */ + + /** + * Constructs a new CheckCompatibilityRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a CheckCompatibilityRequest. + * @implements ICheckCompatibilityRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest=} [properties] Properties to set + */ + function CheckCompatibilityRequest(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckCompatibilityRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.name = ""; + + /** + * CheckCompatibilityRequest schemaType. + * @member {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null|undefined} schemaType + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.schemaType = null; + + /** + * CheckCompatibilityRequest schema. + * @member {string} schema + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.schema = ""; + + /** + * CheckCompatibilityRequest references. + * @member {Array.} references + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.references = $util.emptyArray; + + /** + * CheckCompatibilityRequest verbose. + * @member {boolean|null|undefined} verbose + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @instance + */ + CheckCompatibilityRequest.prototype.verbose = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CheckCompatibilityRequest.prototype, "_schemaType", { + get: $util.oneOfGetter($oneOfFields = ["schemaType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(CheckCompatibilityRequest.prototype, "_verbose", { + get: $util.oneOfGetter($oneOfFields = ["verbose"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CheckCompatibilityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest} CheckCompatibilityRequest instance + */ + CheckCompatibilityRequest.create = function create(properties) { + return new CheckCompatibilityRequest(properties); + }; + + /** + * Encodes the specified CheckCompatibilityRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.schemaType != null && Object.hasOwnProperty.call(message, "schemaType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.schemaType); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.encode(message.references[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.verbose != null && Object.hasOwnProperty.call(message, "verbose")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.verbose); + return writer; + }; + + /** + * Encodes the specified CheckCompatibilityRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest} message CheckCompatibilityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest} CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.schemaType = reader.int32(); + break; + } + case 3: { + message.schema = reader.string(); + break; + } + case 4: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.decode(reader, reader.uint32())); + break; + } + case 5: { + message.verbose = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckCompatibilityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest} CheckCompatibilityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckCompatibilityRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckCompatibilityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) { + properties._schemaType = 1; + switch (message.schemaType) { + default: + return "schemaType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + if (message.verbose != null && message.hasOwnProperty("verbose")) { + properties._verbose = 1; + if (typeof message.verbose !== "boolean") + return "verbose: boolean expected"; + } + return null; + }; + + /** + * Creates a CheckCompatibilityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest} CheckCompatibilityRequest + */ + CheckCompatibilityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.schemaType) { + default: + if (typeof object.schemaType === "number") { + message.schemaType = object.schemaType; + break; + } + break; + case "SCHEMA_TYPE_UNSPECIFIED": + case 0: + message.schemaType = 0; + break; + case "AVRO": + case 1: + message.schemaType = 1; + break; + case "JSON": + case 2: + message.schemaType = 2; + break; + case "PROTOBUF": + case 3: + message.schemaType = 3; + break; + } + if (object.schema != null) + message.schema = String(object.schema); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest.references: object expected"); + message.references[i] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.fromObject(object.references[i]); + } + } + if (object.verbose != null) + message.verbose = Boolean(object.verbose); + return message; + }; + + /** + * Creates a plain object from a CheckCompatibilityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest} message CheckCompatibilityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckCompatibilityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.name = ""; + object.schema = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) { + object.schemaType = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] === undefined ? message.schemaType : $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] : message.schemaType; + if (options.oneofs) + object._schemaType = "schemaType"; + } + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.toObject(message.references[j], options); + } + if (message.verbose != null && message.hasOwnProperty("verbose")) { + object.verbose = message.verbose; + if (options.oneofs) + object._verbose = "verbose"; + } + return object; + }; + + /** + * Converts this CheckCompatibilityRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @instance + * @returns {Object.} JSON object + */ + CheckCompatibilityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckCompatibilityRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckCompatibilityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest"; + }; + + return CheckCompatibilityRequest; + })(); + + v1.CheckCompatibilityResponse = (function() { + + /** + * Properties of a CheckCompatibilityResponse. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ICheckCompatibilityResponse + * @property {boolean|null} [isCompatible] CheckCompatibilityResponse isCompatible + * @property {Array.|null} [messages] CheckCompatibilityResponse messages + */ + + /** + * Constructs a new CheckCompatibilityResponse. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a CheckCompatibilityResponse. + * @implements ICheckCompatibilityResponse + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse=} [properties] Properties to set + */ + function CheckCompatibilityResponse(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckCompatibilityResponse isCompatible. + * @member {boolean} isCompatible + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @instance + */ + CheckCompatibilityResponse.prototype.isCompatible = false; + + /** + * CheckCompatibilityResponse messages. + * @member {Array.} messages + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @instance + */ + CheckCompatibilityResponse.prototype.messages = $util.emptyArray; + + /** + * Creates a new CheckCompatibilityResponse instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse} CheckCompatibilityResponse instance + */ + CheckCompatibilityResponse.create = function create(properties) { + return new CheckCompatibilityResponse(properties); + }; + + /** + * Encodes the specified CheckCompatibilityResponse message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isCompatible != null && Object.hasOwnProperty.call(message, "isCompatible")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isCompatible); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.messages[i]); + return writer; + }; + + /** + * Encodes the specified CheckCompatibilityResponse message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse} message CheckCompatibilityResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckCompatibilityResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse} CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.isCompatible = reader.bool(); + break; + } + case 2: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckCompatibilityResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse} CheckCompatibilityResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckCompatibilityResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckCompatibilityResponse message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckCompatibilityResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isCompatible != null && message.hasOwnProperty("isCompatible")) + if (typeof message.isCompatible !== "boolean") + return "isCompatible: boolean expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) + if (!$util.isString(message.messages[i])) + return "messages: string[] expected"; + } + return null; + }; + + /** + * Creates a CheckCompatibilityResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse} CheckCompatibilityResponse + */ + CheckCompatibilityResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse(); + if (object.isCompatible != null) + message.isCompatible = Boolean(object.isCompatible); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) + message.messages[i] = String(object.messages[i]); + } + return message; + }; + + /** + * Creates a plain object from a CheckCompatibilityResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse} message CheckCompatibilityResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckCompatibilityResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (options.defaults) + object.isCompatible = false; + if (message.isCompatible != null && message.hasOwnProperty("isCompatible")) + object.isCompatible = message.isCompatible; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = message.messages[j]; + } + return object; + }; + + /** + * Converts this CheckCompatibilityResponse to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @instance + * @returns {Object.} JSON object + */ + CheckCompatibilityResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckCompatibilityResponse + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckCompatibilityResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse"; + }; + + return CheckCompatibilityResponse; + })(); + + v1.GetSchemaConfigRequest = (function() { + + /** + * Properties of a GetSchemaConfigRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IGetSchemaConfigRequest + * @property {string|null} [name] GetSchemaConfigRequest name + * @property {boolean|null} [defaultToGlobal] GetSchemaConfigRequest defaultToGlobal + */ + + /** + * Constructs a new GetSchemaConfigRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a GetSchemaConfigRequest. + * @implements IGetSchemaConfigRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest=} [properties] Properties to set + */ + function GetSchemaConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSchemaConfigRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @instance + */ + GetSchemaConfigRequest.prototype.name = ""; + + /** + * GetSchemaConfigRequest defaultToGlobal. + * @member {boolean|null|undefined} defaultToGlobal + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @instance + */ + GetSchemaConfigRequest.prototype.defaultToGlobal = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(GetSchemaConfigRequest.prototype, "_defaultToGlobal", { + get: $util.oneOfGetter($oneOfFields = ["defaultToGlobal"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetSchemaConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest} GetSchemaConfigRequest instance + */ + GetSchemaConfigRequest.create = function create(properties) { + return new GetSchemaConfigRequest(properties); + }; + + /** + * Encodes the specified GetSchemaConfigRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest} message GetSchemaConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.defaultToGlobal != null && Object.hasOwnProperty.call(message, "defaultToGlobal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.defaultToGlobal); + return writer; + }; + + /** + * Encodes the specified GetSchemaConfigRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest} message GetSchemaConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSchemaConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest} GetSchemaConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.defaultToGlobal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSchemaConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest} GetSchemaConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSchemaConfigRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSchemaConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.defaultToGlobal != null && message.hasOwnProperty("defaultToGlobal")) { + properties._defaultToGlobal = 1; + if (typeof message.defaultToGlobal !== "boolean") + return "defaultToGlobal: boolean expected"; + } + return null; + }; + + /** + * Creates a GetSchemaConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest} GetSchemaConfigRequest + */ + GetSchemaConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.defaultToGlobal != null) + message.defaultToGlobal = Boolean(object.defaultToGlobal); + return message; + }; + + /** + * Creates a plain object from a GetSchemaConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest} message GetSchemaConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSchemaConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.defaultToGlobal != null && message.hasOwnProperty("defaultToGlobal")) { + object.defaultToGlobal = message.defaultToGlobal; + if (options.oneofs) + object._defaultToGlobal = "defaultToGlobal"; + } + return object; + }; + + /** + * Converts this GetSchemaConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetSchemaConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSchemaConfigRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSchemaConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest"; + }; + + return GetSchemaConfigRequest; + })(); + + v1.UpdateSchemaConfigRequest = (function() { + + /** + * Properties of an UpdateSchemaConfigRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IUpdateSchemaConfigRequest + * @property {string|null} [name] UpdateSchemaConfigRequest name + * @property {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null} [compatibility] UpdateSchemaConfigRequest compatibility + * @property {boolean|null} [normalize] UpdateSchemaConfigRequest normalize + */ + + /** + * Constructs a new UpdateSchemaConfigRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents an UpdateSchemaConfigRequest. + * @implements IUpdateSchemaConfigRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest=} [properties] Properties to set + */ + function UpdateSchemaConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSchemaConfigRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @instance + */ + UpdateSchemaConfigRequest.prototype.name = ""; + + /** + * UpdateSchemaConfigRequest compatibility. + * @member {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null|undefined} compatibility + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @instance + */ + UpdateSchemaConfigRequest.prototype.compatibility = null; + + /** + * UpdateSchemaConfigRequest normalize. + * @member {boolean|null|undefined} normalize + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @instance + */ + UpdateSchemaConfigRequest.prototype.normalize = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UpdateSchemaConfigRequest.prototype, "_compatibility", { + get: $util.oneOfGetter($oneOfFields = ["compatibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(UpdateSchemaConfigRequest.prototype, "_normalize", { + get: $util.oneOfGetter($oneOfFields = ["normalize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new UpdateSchemaConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest} UpdateSchemaConfigRequest instance + */ + UpdateSchemaConfigRequest.create = function create(properties) { + return new UpdateSchemaConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateSchemaConfigRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest} message UpdateSchemaConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.compatibility); + if (message.normalize != null && Object.hasOwnProperty.call(message, "normalize")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.normalize); + return writer; + }; + + /** + * Encodes the specified UpdateSchemaConfigRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest} message UpdateSchemaConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSchemaConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest} UpdateSchemaConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.compatibility = reader.int32(); + break; + } + case 3: { + message.normalize = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSchemaConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest} UpdateSchemaConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSchemaConfigRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSchemaConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + properties._compatibility = 1; + switch (message.compatibility) { + default: + return "compatibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + properties._normalize = 1; + if (typeof message.normalize !== "boolean") + return "normalize: boolean expected"; + } + return null; + }; + + /** + * Creates an UpdateSchemaConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest} UpdateSchemaConfigRequest + */ + UpdateSchemaConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.compatibility) { + default: + if (typeof object.compatibility === "number") { + message.compatibility = object.compatibility; + break; + } + break; + case "NONE": + case 0: + message.compatibility = 0; + break; + case "BACKWARD": + case 1: + message.compatibility = 1; + break; + case "BACKWARD_TRANSITIVE": + case 2: + message.compatibility = 2; + break; + case "FORWARD": + case 3: + message.compatibility = 3; + break; + case "FORWARD_TRANSITIVE": + case 4: + message.compatibility = 4; + break; + case "FULL": + case 5: + message.compatibility = 5; + break; + case "FULL_TRANSITIVE": + case 6: + message.compatibility = 6; + break; + } + if (object.normalize != null) + message.normalize = Boolean(object.normalize); + return message; + }; + + /** + * Creates a plain object from an UpdateSchemaConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest} message UpdateSchemaConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSchemaConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + object.compatibility = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType[message.compatibility] === undefined ? message.compatibility : $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType[message.compatibility] : message.compatibility; + if (options.oneofs) + object._compatibility = "compatibility"; + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + object.normalize = message.normalize; + if (options.oneofs) + object._normalize = "normalize"; + } + return object; + }; + + /** + * Converts this UpdateSchemaConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSchemaConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSchemaConfigRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSchemaConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest"; + }; + + return UpdateSchemaConfigRequest; + })(); + + v1.DeleteSchemaConfigRequest = (function() { + + /** + * Properties of a DeleteSchemaConfigRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IDeleteSchemaConfigRequest + * @property {string|null} [name] DeleteSchemaConfigRequest name + */ + + /** + * Constructs a new DeleteSchemaConfigRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a DeleteSchemaConfigRequest. + * @implements IDeleteSchemaConfigRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest=} [properties] Properties to set + */ + function DeleteSchemaConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSchemaConfigRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @instance + */ + DeleteSchemaConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteSchemaConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest} DeleteSchemaConfigRequest instance + */ + DeleteSchemaConfigRequest.create = function create(properties) { + return new DeleteSchemaConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteSchemaConfigRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest} message DeleteSchemaConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaConfigRequest.encode = function encode(message, writer) { + 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 DeleteSchemaConfigRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest} message DeleteSchemaConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSchemaConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest} DeleteSchemaConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaConfigRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSchemaConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest} DeleteSchemaConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSchemaConfigRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSchemaConfigRequest.verify = function verify(message) { + if (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 DeleteSchemaConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest} DeleteSchemaConfigRequest + */ + DeleteSchemaConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSchemaConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest} message DeleteSchemaConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSchemaConfigRequest.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 DeleteSchemaConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSchemaConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSchemaConfigRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSchemaConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest"; + }; + + return DeleteSchemaConfigRequest; + })(); + + v1.GetSchemaModeRequest = (function() { + + /** + * Properties of a GetSchemaModeRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IGetSchemaModeRequest + * @property {string|null} [name] GetSchemaModeRequest name + */ + + /** + * Constructs a new GetSchemaModeRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a GetSchemaModeRequest. + * @implements IGetSchemaModeRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest=} [properties] Properties to set + */ + function GetSchemaModeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetSchemaModeRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @instance + */ + GetSchemaModeRequest.prototype.name = ""; + + /** + * Creates a new GetSchemaModeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest} GetSchemaModeRequest instance + */ + GetSchemaModeRequest.create = function create(properties) { + return new GetSchemaModeRequest(properties); + }; + + /** + * Encodes the specified GetSchemaModeRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest} message GetSchemaModeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaModeRequest.encode = function encode(message, writer) { + 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 GetSchemaModeRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest} message GetSchemaModeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetSchemaModeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetSchemaModeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest} GetSchemaModeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaModeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetSchemaModeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest} GetSchemaModeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetSchemaModeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetSchemaModeRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetSchemaModeRequest.verify = function verify(message) { + if (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 GetSchemaModeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest} GetSchemaModeRequest + */ + GetSchemaModeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetSchemaModeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest} message GetSchemaModeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetSchemaModeRequest.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 GetSchemaModeRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @instance + * @returns {Object.} JSON object + */ + GetSchemaModeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetSchemaModeRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetSchemaModeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest"; + }; + + return GetSchemaModeRequest; + })(); + + v1.UpdateSchemaModeRequest = (function() { + + /** + * Properties of an UpdateSchemaModeRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IUpdateSchemaModeRequest + * @property {string|null} [name] UpdateSchemaModeRequest name + * @property {google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|null} [mode] UpdateSchemaModeRequest mode + */ + + /** + * Constructs a new UpdateSchemaModeRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents an UpdateSchemaModeRequest. + * @implements IUpdateSchemaModeRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest=} [properties] Properties to set + */ + function UpdateSchemaModeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateSchemaModeRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @instance + */ + UpdateSchemaModeRequest.prototype.name = ""; + + /** + * UpdateSchemaModeRequest mode. + * @member {google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType} mode + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @instance + */ + UpdateSchemaModeRequest.prototype.mode = 0; + + /** + * Creates a new UpdateSchemaModeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest} UpdateSchemaModeRequest instance + */ + UpdateSchemaModeRequest.create = function create(properties) { + return new UpdateSchemaModeRequest(properties); + }; + + /** + * Encodes the specified UpdateSchemaModeRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest} message UpdateSchemaModeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaModeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified UpdateSchemaModeRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest} message UpdateSchemaModeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateSchemaModeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateSchemaModeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest} UpdateSchemaModeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaModeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateSchemaModeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest} UpdateSchemaModeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateSchemaModeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateSchemaModeRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateSchemaModeRequest.verify = function verify(message) { + if (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.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an UpdateSchemaModeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest} UpdateSchemaModeRequest + */ + UpdateSchemaModeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "NONE": + case 0: + message.mode = 0; + break; + case "READONLY": + case 1: + message.mode = 1; + break; + case "READWRITE": + case 2: + message.mode = 2; + break; + case "IMPORT": + case 3: + message.mode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an UpdateSchemaModeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest} message UpdateSchemaModeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateSchemaModeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.mode = options.enums === String ? "NONE" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType[message.mode] === undefined ? message.mode : $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType[message.mode] : message.mode; + return object; + }; + + /** + * Converts this UpdateSchemaModeRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateSchemaModeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateSchemaModeRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateSchemaModeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest"; + }; + + return UpdateSchemaModeRequest; + })(); + + v1.DeleteSchemaModeRequest = (function() { + + /** + * Properties of a DeleteSchemaModeRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IDeleteSchemaModeRequest + * @property {string|null} [name] DeleteSchemaModeRequest name + */ + + /** + * Constructs a new DeleteSchemaModeRequest. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a DeleteSchemaModeRequest. + * @implements IDeleteSchemaModeRequest + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest=} [properties] Properties to set + */ + function DeleteSchemaModeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteSchemaModeRequest name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @instance + */ + DeleteSchemaModeRequest.prototype.name = ""; + + /** + * Creates a new DeleteSchemaModeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest} DeleteSchemaModeRequest instance + */ + DeleteSchemaModeRequest.create = function create(properties) { + return new DeleteSchemaModeRequest(properties); + }; + + /** + * Encodes the specified DeleteSchemaModeRequest message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest} message DeleteSchemaModeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaModeRequest.encode = function encode(message, writer) { + 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 DeleteSchemaModeRequest message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest} message DeleteSchemaModeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteSchemaModeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteSchemaModeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest} DeleteSchemaModeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaModeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteSchemaModeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest} DeleteSchemaModeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteSchemaModeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteSchemaModeRequest message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteSchemaModeRequest.verify = function verify(message) { + if (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 DeleteSchemaModeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest} DeleteSchemaModeRequest + */ + DeleteSchemaModeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteSchemaModeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest} message DeleteSchemaModeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteSchemaModeRequest.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 DeleteSchemaModeRequest to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteSchemaModeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteSchemaModeRequest + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteSchemaModeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest"; + }; + + return DeleteSchemaModeRequest; + })(); + + v1.SchemaRegistry = (function() { + + /** + * Properties of a SchemaRegistry. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ISchemaRegistry + * @property {string|null} [name] SchemaRegistry name + * @property {Array.|null} [contexts] SchemaRegistry contexts + */ + + /** + * Constructs a new SchemaRegistry. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a SchemaRegistry. + * @implements ISchemaRegistry + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry=} [properties] Properties to set + */ + function SchemaRegistry(properties) { + this.contexts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaRegistry name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @instance + */ + SchemaRegistry.prototype.name = ""; + + /** + * SchemaRegistry contexts. + * @member {Array.} contexts + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @instance + */ + SchemaRegistry.prototype.contexts = $util.emptyArray; + + /** + * Creates a new SchemaRegistry instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} SchemaRegistry instance + */ + SchemaRegistry.create = function create(properties) { + return new SchemaRegistry(properties); + }; + + /** + * Encodes the specified SchemaRegistry message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry} message SchemaRegistry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRegistry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.contexts != null && message.contexts.length) + for (var i = 0; i < message.contexts.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.contexts[i]); + return writer; + }; + + /** + * Encodes the specified SchemaRegistry message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry} message SchemaRegistry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaRegistry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaRegistry message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} SchemaRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRegistry.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.contexts && message.contexts.length)) + message.contexts = []; + message.contexts.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaRegistry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} SchemaRegistry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaRegistry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaRegistry message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaRegistry.verify = function verify(message) { + if (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.contexts != null && message.hasOwnProperty("contexts")) { + if (!Array.isArray(message.contexts)) + return "contexts: array expected"; + for (var i = 0; i < message.contexts.length; ++i) + if (!$util.isString(message.contexts[i])) + return "contexts: string[] expected"; + } + return null; + }; + + /** + * Creates a SchemaRegistry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} SchemaRegistry + */ + SchemaRegistry.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry(); + if (object.name != null) + message.name = String(object.name); + if (object.contexts) { + if (!Array.isArray(object.contexts)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry.contexts: array expected"); + message.contexts = []; + for (var i = 0; i < object.contexts.length; ++i) + message.contexts[i] = String(object.contexts[i]); + } + return message; + }; + + /** + * Creates a plain object from a SchemaRegistry message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} message SchemaRegistry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaRegistry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contexts = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.contexts && message.contexts.length) { + object.contexts = []; + for (var j = 0; j < message.contexts.length; ++j) + object.contexts[j] = message.contexts[j]; + } + return object; + }; + + /** + * Converts this SchemaRegistry to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @instance + * @returns {Object.} JSON object + */ + SchemaRegistry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaRegistry + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaRegistry.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry"; + }; + + return SchemaRegistry; + })(); + + v1.Context = (function() { + + /** + * Properties of a Context. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface IContext + * @property {string|null} [name] Context name + * @property {Array.|null} [subjects] Context subjects + */ + + /** + * Constructs a new Context. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a Context. + * @implements IContext + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.IContext=} [properties] Properties to set + */ + function Context(properties) { + this.subjects = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Context name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @instance + */ + Context.prototype.name = ""; + + /** + * Context subjects. + * @member {Array.} subjects + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @instance + */ + Context.prototype.subjects = $util.emptyArray; + + /** + * Creates a new Context instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IContext=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.Context} Context instance + */ + Context.create = function create(properties) { + return new Context(properties); + }; + + /** + * Encodes the specified Context message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Context.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.subjects != null && message.subjects.length) + for (var i = 0; i < message.subjects.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subjects[i]); + return writer; + }; + + /** + * Encodes the specified Context message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Context.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.IContext} message Context message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Context.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Context message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.Context(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.subjects && message.subjects.length)) + message.subjects = []; + message.subjects.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Context message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.Context} Context + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Context.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Context message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Context.verify = function verify(message) { + if (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.subjects != null && message.hasOwnProperty("subjects")) { + if (!Array.isArray(message.subjects)) + return "subjects: array expected"; + for (var i = 0; i < message.subjects.length; ++i) + if (!$util.isString(message.subjects[i])) + return "subjects: string[] expected"; + } + return null; + }; + + /** + * Creates a Context message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.Context} Context + */ + Context.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.Context) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.Context(); + if (object.name != null) + message.name = String(object.name); + if (object.subjects) { + if (!Array.isArray(object.subjects)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.Context.subjects: array expected"); + message.subjects = []; + for (var i = 0; i < object.subjects.length; ++i) + message.subjects[i] = String(object.subjects[i]); + } + return message; + }; + + /** + * Creates a plain object from a Context message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.Context} message Context + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Context.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.subjects = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.subjects && message.subjects.length) { + object.subjects = []; + for (var j = 0; j < message.subjects.length; ++j) + object.subjects[j] = message.subjects[j]; + } + return object; + }; + + /** + * Converts this Context to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @instance + * @returns {Object.} JSON object + */ + Context.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Context + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.Context + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Context.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.Context"; + }; + + return Context; + })(); + + v1.Schema = (function() { + + /** + * Properties of a Schema. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ISchema + * @property {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null} [schemaType] Schema schemaType + * @property {string|null} [schemaPayload] Schema schemaPayload + * @property {Array.|null} [references] Schema references + */ + + /** + * Constructs a new Schema. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a Schema. + * @implements ISchema + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchema=} [properties] Properties to set + */ + function Schema(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Schema schemaType. + * @member {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType} schemaType + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @instance + */ + Schema.prototype.schemaType = 0; + + /** + * Schema schemaPayload. + * @member {string} schemaPayload + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @instance + */ + Schema.prototype.schemaPayload = ""; + + /** + * Schema references. + * @member {Array.} references + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @instance + */ + Schema.prototype.references = $util.emptyArray; + + /** + * Creates a new Schema instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchema=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema} Schema instance + */ + Schema.create = function create(properties) { + return new Schema(properties); + }; + + /** + * Encodes the specified Schema message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemaType != null && Object.hasOwnProperty.call(message, "schemaType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.schemaType); + if (message.schemaPayload != null && Object.hasOwnProperty.call(message, "schemaPayload")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaPayload); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.encode(message.references[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchema} message Schema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schema message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.Schema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaType = reader.int32(); + break; + } + case 2: { + message.schemaPayload = reader.string(); + break; + } + case 3: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Schema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema} Schema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schema message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schema.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) + switch (message.schemaType) { + default: + return "schemaType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.schemaPayload != null && message.hasOwnProperty("schemaPayload")) + if (!$util.isString(message.schemaPayload)) + return "schemaPayload: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + return null; + }; + + /** + * Creates a Schema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema} Schema + */ + Schema.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.Schema) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.Schema(); + switch (object.schemaType) { + default: + if (typeof object.schemaType === "number") { + message.schemaType = object.schemaType; + break; + } + break; + case "SCHEMA_TYPE_UNSPECIFIED": + case 0: + message.schemaType = 0; + break; + case "AVRO": + case 1: + message.schemaType = 1; + break; + case "JSON": + case 2: + message.schemaType = 2; + break; + case "PROTOBUF": + case 3: + message.schemaType = 3; + break; + } + if (object.schemaPayload != null) + message.schemaPayload = String(object.schemaPayload); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.Schema.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.Schema.references: object expected"); + message.references[i] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.fromObject(object.references[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Schema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema} message Schema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.schemaType = options.enums === String ? "SCHEMA_TYPE_UNSPECIFIED" : 0; + object.schemaPayload = ""; + } + if (message.schemaType != null && message.hasOwnProperty("schemaType")) + object.schemaType = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] === undefined ? message.schemaType : $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] : message.schemaType; + if (message.schemaPayload != null && message.hasOwnProperty("schemaPayload")) + object.schemaPayload = message.schemaPayload; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.toObject(message.references[j], options); + } + return object; + }; + + /** + * Converts this Schema to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @instance + * @returns {Object.} JSON object + */ + Schema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schema + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.Schema"; + }; + + Schema.SchemaReference = (function() { + + /** + * Properties of a SchemaReference. + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @interface ISchemaReference + * @property {string|null} [name] SchemaReference name + * @property {string|null} [subject] SchemaReference subject + * @property {number|null} [version] SchemaReference version + */ + + /** + * Constructs a new SchemaReference. + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema + * @classdesc Represents a SchemaReference. + * @implements ISchemaReference + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference=} [properties] Properties to set + */ + function SchemaReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaReference name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @instance + */ + SchemaReference.prototype.name = ""; + + /** + * SchemaReference subject. + * @member {string} subject + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @instance + */ + SchemaReference.prototype.subject = ""; + + /** + * SchemaReference version. + * @member {number} version + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @instance + */ + SchemaReference.prototype.version = 0; + + /** + * Creates a new SchemaReference instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference} SchemaReference instance + */ + SchemaReference.create = function create(properties) { + return new SchemaReference(properties); + }; + + /** + * Encodes the specified SchemaReference message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference} message SchemaReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.version); + return writer; + }; + + /** + * Encodes the specified SchemaReference message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.ISchemaReference} message SchemaReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference} SchemaReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.subject = reader.string(); + break; + } + case 3: { + message.version = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference} SchemaReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaReference message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaReference.verify = function verify(message) { + if (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.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isInteger(message.version)) + return "version: integer expected"; + return null; + }; + + /** + * Creates a SchemaReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference} SchemaReference + */ + SchemaReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference(); + if (object.name != null) + message.name = String(object.name); + if (object.subject != null) + message.subject = String(object.subject); + if (object.version != null) + message.version = object.version | 0; + return message; + }; + + /** + * Creates a plain object from a SchemaReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference} message SchemaReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.subject = ""; + object.version = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this SchemaReference to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @instance + * @returns {Object.} JSON object + */ + SchemaReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaReference + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference"; + }; + + return SchemaReference; + })(); + + /** + * SchemaType enum. + * @name google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType + * @enum {number} + * @property {number} SCHEMA_TYPE_UNSPECIFIED=0 SCHEMA_TYPE_UNSPECIFIED value + * @property {number} AVRO=1 AVRO value + * @property {number} JSON=2 JSON value + * @property {number} PROTOBUF=3 PROTOBUF value + */ + Schema.SchemaType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AVRO"] = 1; + values[valuesById[2] = "JSON"] = 2; + values[valuesById[3] = "PROTOBUF"] = 3; + return values; + })(); + + return Schema; + })(); + + v1.SchemaSubject = (function() { + + /** + * Properties of a SchemaSubject. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ISchemaSubject + * @property {string|null} [name] SchemaSubject name + * @property {Array.|null} [versions] SchemaSubject versions + */ + + /** + * Constructs a new SchemaSubject. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a SchemaSubject. + * @implements ISchemaSubject + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject=} [properties] Properties to set + */ + function SchemaSubject(properties) { + this.versions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaSubject name. + * @member {string} name + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @instance + */ + SchemaSubject.prototype.name = ""; + + /** + * SchemaSubject versions. + * @member {Array.} versions + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @instance + */ + SchemaSubject.prototype.versions = $util.emptyArray; + + /** + * Creates a new SchemaSubject instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaSubject} SchemaSubject instance + */ + SchemaSubject.create = function create(properties) { + return new SchemaSubject(properties); + }; + + /** + * Encodes the specified SchemaSubject message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaSubject.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject} message SchemaSubject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaSubject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.versions != null && message.versions.length) + for (var i = 0; i < message.versions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.versions[i]); + return writer; + }; + + /** + * Encodes the specified SchemaSubject message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaSubject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaSubject} message SchemaSubject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaSubject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaSubject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaSubject} SchemaSubject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaSubject.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaSubject(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaSubject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaSubject} SchemaSubject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaSubject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaSubject message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaSubject.verify = function verify(message) { + if (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.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (var i = 0; i < message.versions.length; ++i) + if (!$util.isString(message.versions[i])) + return "versions: string[] expected"; + } + return null; + }; + + /** + * Creates a SchemaSubject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaSubject} SchemaSubject + */ + SchemaSubject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.SchemaSubject) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaSubject(); + if (object.name != null) + message.name = String(object.name); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.SchemaSubject.versions: array expected"); + message.versions = []; + for (var i = 0; i < object.versions.length; ++i) + message.versions[i] = String(object.versions[i]); + } + return message; + }; + + /** + * Creates a plain object from a SchemaSubject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaSubject} message SchemaSubject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaSubject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.versions && message.versions.length) { + object.versions = []; + for (var j = 0; j < message.versions.length; ++j) + object.versions[j] = message.versions[j]; + } + return object; + }; + + /** + * Converts this SchemaSubject to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @instance + * @returns {Object.} JSON object + */ + SchemaSubject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaSubject + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaSubject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaSubject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.SchemaSubject"; + }; + + return SchemaSubject; + })(); + + v1.SchemaVersion = (function() { + + /** + * Properties of a SchemaVersion. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ISchemaVersion + * @property {string|null} [subject] SchemaVersion subject + * @property {number|null} [versionId] SchemaVersion versionId + * @property {number|null} [schemaId] SchemaVersion schemaId + * @property {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType|null} [schemaType] SchemaVersion schemaType + * @property {string|null} [schemaPayload] SchemaVersion schemaPayload + * @property {Array.|null} [references] SchemaVersion references + */ + + /** + * Constructs a new SchemaVersion. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a SchemaVersion. + * @implements ISchemaVersion + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion=} [properties] Properties to set + */ + function SchemaVersion(properties) { + this.references = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaVersion subject. + * @member {string} subject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @instance + */ + SchemaVersion.prototype.subject = ""; + + /** + * SchemaVersion versionId. + * @member {number} versionId + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @instance + */ + SchemaVersion.prototype.versionId = 0; + + /** + * SchemaVersion schemaId. + * @member {number} schemaId + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @instance + */ + SchemaVersion.prototype.schemaId = 0; + + /** + * SchemaVersion schemaType. + * @member {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType} schemaType + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @instance + */ + SchemaVersion.prototype.schemaType = 0; + + /** + * SchemaVersion schemaPayload. + * @member {string} schemaPayload + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @instance + */ + SchemaVersion.prototype.schemaPayload = ""; + + /** + * SchemaVersion references. + * @member {Array.} references + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @instance + */ + SchemaVersion.prototype.references = $util.emptyArray; + + /** + * Creates a new SchemaVersion instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaVersion} SchemaVersion instance + */ + SchemaVersion.create = function create(properties) { + return new SchemaVersion(properties); + }; + + /** + * Encodes the specified SchemaVersion message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion} message SchemaVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subject); + if (message.versionId != null && Object.hasOwnProperty.call(message, "versionId")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.versionId); + if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.schemaId); + if (message.schemaType != null && Object.hasOwnProperty.call(message, "schemaType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.schemaType); + if (message.schemaPayload != null && Object.hasOwnProperty.call(message, "schemaPayload")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.schemaPayload); + if (message.references != null && message.references.length) + for (var i = 0; i < message.references.length; ++i) + $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.encode(message.references[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SchemaVersion message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion} message SchemaVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaVersion} SchemaVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaVersion.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.subject = reader.string(); + break; + } + case 2: { + message.versionId = reader.int32(); + break; + } + case 3: { + message.schemaId = reader.int32(); + break; + } + case 4: { + message.schemaType = reader.int32(); + break; + } + case 5: { + message.schemaPayload = reader.string(); + break; + } + case 6: { + if (!(message.references && message.references.length)) + message.references = []; + message.references.push($root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaVersion} SchemaVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaVersion message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.versionId != null && message.hasOwnProperty("versionId")) + if (!$util.isInteger(message.versionId)) + return "versionId: integer expected"; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + if (!$util.isInteger(message.schemaId)) + return "schemaId: integer expected"; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) + switch (message.schemaType) { + default: + return "schemaType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.schemaPayload != null && message.hasOwnProperty("schemaPayload")) + if (!$util.isString(message.schemaPayload)) + return "schemaPayload: string expected"; + if (message.references != null && message.hasOwnProperty("references")) { + if (!Array.isArray(message.references)) + return "references: array expected"; + for (var i = 0; i < message.references.length; ++i) { + var error = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.verify(message.references[i]); + if (error) + return "references." + error; + } + } + return null; + }; + + /** + * Creates a SchemaVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaVersion} SchemaVersion + */ + SchemaVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion(); + if (object.subject != null) + message.subject = String(object.subject); + if (object.versionId != null) + message.versionId = object.versionId | 0; + if (object.schemaId != null) + message.schemaId = object.schemaId | 0; + switch (object.schemaType) { + default: + if (typeof object.schemaType === "number") { + message.schemaType = object.schemaType; + break; + } + break; + case "SCHEMA_TYPE_UNSPECIFIED": + case 0: + message.schemaType = 0; + break; + case "AVRO": + case 1: + message.schemaType = 1; + break; + case "JSON": + case 2: + message.schemaType = 2; + break; + case "PROTOBUF": + case 3: + message.schemaType = 3; + break; + } + if (object.schemaPayload != null) + message.schemaPayload = String(object.schemaPayload); + if (object.references) { + if (!Array.isArray(object.references)) + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.SchemaVersion.references: array expected"); + message.references = []; + for (var i = 0; i < object.references.length; ++i) { + if (typeof object.references[i] !== "object") + throw TypeError(".google.cloud.managedkafka.schemaregistry.v1.SchemaVersion.references: object expected"); + message.references[i] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.fromObject(object.references[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SchemaVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaVersion} message SchemaVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.references = []; + if (options.defaults) { + object.subject = ""; + object.versionId = 0; + object.schemaId = 0; + object.schemaType = options.enums === String ? "SCHEMA_TYPE_UNSPECIFIED" : 0; + object.schemaPayload = ""; + } + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.versionId != null && message.hasOwnProperty("versionId")) + object.versionId = message.versionId; + if (message.schemaId != null && message.hasOwnProperty("schemaId")) + object.schemaId = message.schemaId; + if (message.schemaType != null && message.hasOwnProperty("schemaType")) + object.schemaType = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] === undefined ? message.schemaType : $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType[message.schemaType] : message.schemaType; + if (message.schemaPayload != null && message.hasOwnProperty("schemaPayload")) + object.schemaPayload = message.schemaPayload; + if (message.references && message.references.length) { + object.references = []; + for (var j = 0; j < message.references.length; ++j) + object.references[j] = $root.google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaReference.toObject(message.references[j], options); + } + return object; + }; + + /** + * Converts this SchemaVersion to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @instance + * @returns {Object.} JSON object + */ + SchemaVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaVersion + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.SchemaVersion"; + }; + + return SchemaVersion; + })(); + + v1.SchemaConfig = (function() { + + /** + * Properties of a SchemaConfig. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ISchemaConfig + * @property {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null} [compatibility] SchemaConfig compatibility + * @property {boolean|null} [normalize] SchemaConfig normalize + * @property {string|null} [alias] SchemaConfig alias + */ + + /** + * Constructs a new SchemaConfig. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a SchemaConfig. + * @implements ISchemaConfig + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig=} [properties] Properties to set + */ + function SchemaConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaConfig compatibility. + * @member {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType|null|undefined} compatibility + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @instance + */ + SchemaConfig.prototype.compatibility = null; + + /** + * SchemaConfig normalize. + * @member {boolean|null|undefined} normalize + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @instance + */ + SchemaConfig.prototype.normalize = null; + + /** + * SchemaConfig alias. + * @member {string} alias + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @instance + */ + SchemaConfig.prototype.alias = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SchemaConfig.prototype, "_compatibility", { + get: $util.oneOfGetter($oneOfFields = ["compatibility"]), + set: $util.oneOfSetter($oneOfFields) + }); + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SchemaConfig.prototype, "_normalize", { + get: $util.oneOfGetter($oneOfFields = ["normalize"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SchemaConfig instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} SchemaConfig instance + */ + SchemaConfig.create = function create(properties) { + return new SchemaConfig(properties); + }; + + /** + * Encodes the specified SchemaConfig message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig} message SchemaConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compatibility != null && Object.hasOwnProperty.call(message, "compatibility")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.compatibility); + if (message.normalize != null && Object.hasOwnProperty.call(message, "normalize")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.normalize); + if (message.alias != null && Object.hasOwnProperty.call(message, "alias")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.alias); + return writer; + }; + + /** + * Encodes the specified SchemaConfig message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig} message SchemaConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} SchemaConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.compatibility = reader.int32(); + break; + } + case 2: { + message.normalize = reader.bool(); + break; + } + case 3: { + message.alias = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} SchemaConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaConfig message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + properties._compatibility = 1; + switch (message.compatibility) { + default: + return "compatibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + properties._normalize = 1; + if (typeof message.normalize !== "boolean") + return "normalize: boolean expected"; + } + if (message.alias != null && message.hasOwnProperty("alias")) + if (!$util.isString(message.alias)) + return "alias: string expected"; + return null; + }; + + /** + * Creates a SchemaConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} SchemaConfig + */ + SchemaConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig(); + switch (object.compatibility) { + default: + if (typeof object.compatibility === "number") { + message.compatibility = object.compatibility; + break; + } + break; + case "NONE": + case 0: + message.compatibility = 0; + break; + case "BACKWARD": + case 1: + message.compatibility = 1; + break; + case "BACKWARD_TRANSITIVE": + case 2: + message.compatibility = 2; + break; + case "FORWARD": + case 3: + message.compatibility = 3; + break; + case "FORWARD_TRANSITIVE": + case 4: + message.compatibility = 4; + break; + case "FULL": + case 5: + message.compatibility = 5; + break; + case "FULL_TRANSITIVE": + case 6: + message.compatibility = 6; + break; + } + if (object.normalize != null) + message.normalize = Boolean(object.normalize); + if (object.alias != null) + message.alias = String(object.alias); + return message; + }; + + /** + * Creates a plain object from a SchemaConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig} message SchemaConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.alias = ""; + if (message.compatibility != null && message.hasOwnProperty("compatibility")) { + object.compatibility = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType[message.compatibility] === undefined ? message.compatibility : $root.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType[message.compatibility] : message.compatibility; + if (options.oneofs) + object._compatibility = "compatibility"; + } + if (message.normalize != null && message.hasOwnProperty("normalize")) { + object.normalize = message.normalize; + if (options.oneofs) + object._normalize = "normalize"; + } + if (message.alias != null && message.hasOwnProperty("alias")) + object.alias = message.alias; + return object; + }; + + /** + * Converts this SchemaConfig to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @instance + * @returns {Object.} JSON object + */ + SchemaConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaConfig + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.SchemaConfig"; + }; + + /** + * CompatibilityType enum. + * @name google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} BACKWARD=1 BACKWARD value + * @property {number} BACKWARD_TRANSITIVE=2 BACKWARD_TRANSITIVE value + * @property {number} FORWARD=3 FORWARD value + * @property {number} FORWARD_TRANSITIVE=4 FORWARD_TRANSITIVE value + * @property {number} FULL=5 FULL value + * @property {number} FULL_TRANSITIVE=6 FULL_TRANSITIVE value + */ + SchemaConfig.CompatibilityType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "BACKWARD"] = 1; + values[valuesById[2] = "BACKWARD_TRANSITIVE"] = 2; + values[valuesById[3] = "FORWARD"] = 3; + values[valuesById[4] = "FORWARD_TRANSITIVE"] = 4; + values[valuesById[5] = "FULL"] = 5; + values[valuesById[6] = "FULL_TRANSITIVE"] = 6; + return values; + })(); + + return SchemaConfig; + })(); + + v1.SchemaMode = (function() { + + /** + * Properties of a SchemaMode. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @interface ISchemaMode + * @property {google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType|null} [mode] SchemaMode mode + */ + + /** + * Constructs a new SchemaMode. + * @memberof google.cloud.managedkafka.schemaregistry.v1 + * @classdesc Represents a SchemaMode. + * @implements ISchemaMode + * @constructor + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaMode=} [properties] Properties to set + */ + function SchemaMode(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaMode mode. + * @member {google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType} mode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @instance + */ + SchemaMode.prototype.mode = 0; + + /** + * Creates a new SchemaMode instance using the specified properties. + * @function create + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaMode=} [properties] Properties to set + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} SchemaMode instance + */ + SchemaMode.create = function create(properties) { + return new SchemaMode(properties); + }; + + /** + * Encodes the specified SchemaMode message. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaMode.verify|verify} messages. + * @function encode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaMode} message SchemaMode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaMode.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); + return writer; + }; + + /** + * Encodes the specified SchemaMode message, length delimited. Does not implicitly {@link google.cloud.managedkafka.schemaregistry.v1.SchemaMode.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.ISchemaMode} message SchemaMode message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaMode.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaMode message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} SchemaMode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaMode.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaMode message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} SchemaMode + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaMode.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaMode message. + * @function verify + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaMode.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a SchemaMode message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} SchemaMode + */ + SchemaMode.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode) + return object; + var message = new $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "NONE": + case 0: + message.mode = 0; + break; + case "READONLY": + case 1: + message.mode = 1; + break; + case "READWRITE": + case 2: + message.mode = 2; + break; + case "IMPORT": + case 3: + message.mode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a SchemaMode message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaMode} message SchemaMode + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaMode.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "NONE" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType[message.mode] === undefined ? message.mode : $root.google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType[message.mode] : message.mode; + return object; + }; + + /** + * Converts this SchemaMode to JSON. + * @function toJSON + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @instance + * @returns {Object.} JSON object + */ + SchemaMode.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaMode + * @function getTypeUrl + * @memberof google.cloud.managedkafka.schemaregistry.v1.SchemaMode + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaMode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.managedkafka.schemaregistry.v1.SchemaMode"; + }; + + /** + * ModeType enum. + * @name google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} READONLY=1 READONLY value + * @property {number} READWRITE=2 READWRITE value + * @property {number} IMPORT=3 IMPORT value + */ + SchemaMode.ModeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "READONLY"] = 1; + values[valuesById[2] = "READWRITE"] = 2; + values[valuesById[3] = "IMPORT"] = 3; + return values; + })(); + + return SchemaMode; + })(); + + return v1; + })(); + + return schemaregistry; + })(); + + return managedkafka; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration + */ + + /** + * 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; + + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + + /** + * 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(); + } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + 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; + } + } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } + 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; + } + } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } + 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 = ""; + object.selectiveGapicGeneration = null; + } + 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures + */ + + /** + * 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; + + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = 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(); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.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; + } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + 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 (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } + 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; + object.experimentalFeatures = null; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, 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"; + }; + + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices + */ + + /** + * 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) { + this.renamedServices = {}; + if (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; + + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + + /** + * 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(); + 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(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + 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; + } + 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"; + } + 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); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } + 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.objects || options.defaults) + object.renamedServices = {}; + 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]]; + } + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + + /** + * 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.HttpBody = (function() { + + /** + * Properties of a HttpBody. + * @memberof google.api + * @interface IHttpBody + * @property {string|null} [contentType] HttpBody contentType + * @property {Uint8Array|null} [data] HttpBody data + * @property {Array.|null} [extensions] HttpBody extensions + */ + + /** + * Constructs a new HttpBody. + * @memberof google.api + * @classdesc Represents a HttpBody. + * @implements IHttpBody + * @constructor + * @param {google.api.IHttpBody=} [properties] Properties to set + */ + function HttpBody(properties) { + this.extensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpBody contentType. + * @member {string} contentType + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.contentType = ""; + + /** + * HttpBody data. + * @member {Uint8Array} data + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.data = $util.newBuffer([]); + + /** + * HttpBody extensions. + * @member {Array.} extensions + * @memberof google.api.HttpBody + * @instance + */ + HttpBody.prototype.extensions = $util.emptyArray; + + /** + * Creates a new HttpBody instance using the specified properties. + * @function create + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody=} [properties] Properties to set + * @returns {google.api.HttpBody} HttpBody instance + */ + HttpBody.create = function create(properties) { + return new HttpBody(properties); + }; + + /** + * Encodes the specified HttpBody message. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @function encode + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody} message HttpBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpBody.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.contentType != null && Object.hasOwnProperty.call(message, "contentType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.contentType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.extensions != null && message.extensions.length) + for (var i = 0; i < message.extensions.length; ++i) + $root.google.protobuf.Any.encode(message.extensions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HttpBody message, length delimited. Does not implicitly {@link google.api.HttpBody.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpBody + * @static + * @param {google.api.IHttpBody} message HttpBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpBody.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpBody message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpBody} HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpBody.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpBody(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.contentType = reader.string(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + case 3: { + if (!(message.extensions && message.extensions.length)) + message.extensions = []; + message.extensions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpBody message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpBody} HttpBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpBody.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpBody message. + * @function verify + * @memberof google.api.HttpBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.contentType != null && message.hasOwnProperty("contentType")) + if (!$util.isString(message.contentType)) + return "contentType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.extensions != null && message.hasOwnProperty("extensions")) { + if (!Array.isArray(message.extensions)) + return "extensions: array expected"; + for (var i = 0; i < message.extensions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.extensions[i]); + if (error) + return "extensions." + error; + } + } + return null; + }; + + /** + * Creates a HttpBody message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpBody + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpBody} HttpBody + */ + HttpBody.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpBody) + return object; + var message = new $root.google.api.HttpBody(); + if (object.contentType != null) + message.contentType = String(object.contentType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + if (object.extensions) { + if (!Array.isArray(object.extensions)) + throw TypeError(".google.api.HttpBody.extensions: array expected"); + message.extensions = []; + for (var i = 0; i < object.extensions.length; ++i) { + if (typeof object.extensions[i] !== "object") + throw TypeError(".google.api.HttpBody.extensions: object expected"); + message.extensions[i] = $root.google.protobuf.Any.fromObject(object.extensions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpBody message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpBody + * @static + * @param {google.api.HttpBody} message HttpBody + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpBody.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.extensions = []; + if (options.defaults) { + object.contentType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.contentType != null && message.hasOwnProperty("contentType")) + object.contentType = message.contentType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.extensions && message.extensions.length) { + object.extensions = []; + for (var j = 0; j < message.extensions.length; ++j) + object.extensions[j] = $root.google.protobuf.Any.toObject(message.extensions[j], options); + } + return object; + }; + + /** + * Converts this HttpBody to JSON. + * @function toJSON + * @memberof google.api.HttpBody + * @instance + * @returns {Object.} JSON object + */ + HttpBody.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpBody + * @function getTypeUrl + * @memberof google.api.HttpBody + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpBody.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpBody"; + }; + + return HttpBody; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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[900] = "EDITION_LEGACY"] = 900; + 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} [optionDependency] FileDescriptorProto optionDependency + * @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.optionDependency = []; + 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 optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + 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.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] 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 900: + 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.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } + 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_LEGACY": + case 900: + message.edition = 900; + 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 = []; + object.optionDependency = []; + } + 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } + 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 + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility + */ + + /** + * 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; + + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + + /** + * 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 11: { + message.visibility = reader.int32(); + 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"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + 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; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + 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]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility + */ + + /** + * 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; + + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + + /** + * 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 6: { + message.visibility = reader.int32(); + 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"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + 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; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + 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]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport + * @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 featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = 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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.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.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + 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.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + 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.featureSupport = 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.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + 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_LEGACY": + case 900: + message.edition = 900; + 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; + })(); + + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport + * @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 featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + + /** + * 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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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 EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.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 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.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + 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 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.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + 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; + object.featureSupport = null; + } + 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.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, 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 EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility + */ + + /** + * 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; + + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = 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; + } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + 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; + } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; + 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; + })(); + + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 900: + 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 900: + 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_LEGACY": + case 900: + message.minimumEdition = 900; + 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_LEGACY": + case 900: + message.maximumEdition = 900; + 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} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures + */ + + /** + * 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 overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.fixedFeatures = 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.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $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 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); + if (error) + return "fixedFeatures." + 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_LEGACY": + case 900: + message.edition = 900; + 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.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); + } + 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.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; + } + 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-cloud-managedkafka-schemaregistry/protos/protos.json b/packages/google-cloud-managedkafka-schemaregistry/protos/protos.json new file mode 100644 index 000000000000..752eac96c155 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/protos/protos.json @@ -0,0 +1,3673 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "managedkafka": { + "nested": { + "schemaregistry": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.ManagedKafka.SchemaRegistry.V1", + "go_package": "cloud.google.com/go/managedkafka/schemaregistry/apiv1/schemaregistrypb;schemaregistrypb", + "java_multiple_files": true, + "java_outer_classname": "SchemaRegistryResourcesProto", + "java_package": "com.google.cloud.managedkafka.schemaregistry.v1", + "php_namespace": "Google\\Cloud\\ManagedKafka\\SchemaRegistry\\V1", + "ruby_package": "Google::Cloud::ManagedKafka::SchemaRegistry::V1" + }, + "nested": { + "ManagedSchemaRegistry": { + "options": { + "(google.api.default_host)": "managedkafka.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetSchemaRegistry": { + "requestType": "GetSchemaRegistryRequest", + "responseType": "SchemaRegistry", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListSchemaRegistries": { + "requestType": "ListSchemaRegistriesRequest", + "responseType": "ListSchemaRegistriesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/schemaRegistries", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/schemaRegistries" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateSchemaRegistry": { + "requestType": "CreateSchemaRegistryRequest", + "responseType": "SchemaRegistry", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/schemaRegistries", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,schema_registry" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/schemaRegistries", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,schema_registry" + } + ] + }, + "DeleteSchemaRegistry": { + "requestType": "DeleteSchemaRegistryRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetContext": { + "requestType": "GetContextRequest", + "responseType": "Context", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListContexts": { + "requestType": "ListContextsRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/contexts", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/contexts" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetSchema": { + "requestType": "GetSchemaRequest", + "responseType": "Schema", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetRawSchema": { + "requestType": "GetSchemaRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}/schema", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/schema", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/schemas/**}/schema", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/schema" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListSchemaVersions": { + "requestType": "ListSchemaVersionsRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/versions", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/versions", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/versions" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListSchemaTypes": { + "requestType": "ListSchemaTypesRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/schemas/types", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/schemas/types", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/schemas/types", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/schemas/types" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListSubjects": { + "requestType": "ListSubjectsRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/subjects", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/subjects", + "(google.api.method_signature)": "parent,subject_prefix,deleted" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*}/subjects", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*}/subjects" + } + } + }, + { + "(google.api.method_signature)": "parent,subject_prefix,deleted" + } + ] + }, + "ListSubjectsBySchemaId": { + "requestType": "ListSubjectsBySchemaIdRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/subjects", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/subjects", + "(google.api.method_signature)": "parent,subject,deleted" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/schemas/**}/subjects", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/schemas/**}/subjects" + } + } + }, + { + "(google.api.method_signature)": "parent,subject,deleted" + } + ] + }, + "DeleteSubject": { + "requestType": "DeleteSubjectRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "LookupVersion": { + "requestType": "LookupVersionRequest", + "responseType": "SchemaVersion", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,schema" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent,schema" + } + ] + }, + "GetVersion": { + "requestType": "GetVersionRequest", + "responseType": "SchemaVersion", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetRawSchemaVersion": { + "requestType": "GetVersionRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/schema", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/schema", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/schema", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/schema" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListVersions": { + "requestType": "ListVersionsRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versions", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versions", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateVersion": { + "requestType": "CreateVersionRequest", + "responseType": "CreateVersionResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versions", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,version,id,schema_type,schema,references,normalize" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*}/versions", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*}/versions", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent,version,id,schema_type,schema,references,normalize" + } + ] + }, + "DeleteVersion": { + "requestType": "DeleteVersionRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListReferencedSchemas": { + "requestType": "ListReferencedSchemasRequest", + "responseType": "google.api.HttpBody", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/referencedby", + "(google.api.http).additional_bindings.get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/referencedby", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/subjects/*/versions/*}/referencedby", + "additional_bindings": { + "get": "/v1/{parent=projects/*/locations/*/schemaRegistries/*/contexts/*/subjects/*/versions/*}/referencedby" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CheckCompatibility": { + "requestType": "CheckCompatibilityRequest", + "responseType": "CheckCompatibilityResponse", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/schemaRegistries/*/compatibility/**}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/compatibility/**}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,schema" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/schemaRegistries/*/compatibility/**}", + "body": "*", + "additional_bindings": { + "post": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/compatibility/**}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name,schema" + } + ] + }, + "GetSchemaConfig": { + "requestType": "GetSchemaConfigRequest", + "responseType": "SchemaConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateSchemaConfig": { + "requestType": "UpdateSchemaConfigRequest", + "responseType": "SchemaConfig", + "options": { + "(google.api.http).put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,compatibility" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}", + "body": "*", + "additional_bindings": { + "put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name,compatibility" + } + ] + }, + "DeleteSchemaConfig": { + "requestType": "DeleteSchemaConfigRequest", + "responseType": "SchemaConfig", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/config/**}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/config/**}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetSchemaMode": { + "requestType": "GetSchemaModeRequest", + "responseType": "SchemaMode", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}", + "(google.api.http).additional_bindings.get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}", + "additional_bindings": { + "get": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateSchemaMode": { + "requestType": "UpdateSchemaModeRequest", + "responseType": "SchemaMode", + "options": { + "(google.api.http).put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,mode" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}", + "body": "*", + "additional_bindings": { + "put": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name,mode" + } + ] + }, + "DeleteSchemaMode": { + "requestType": "DeleteSchemaModeRequest", + "responseType": "SchemaMode", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}", + "(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/mode/**}", + "additional_bindings": { + "delete": "/v1/{name=projects/*/locations/*/schemaRegistries/*/contexts/*/mode/**}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "GetSchemaRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaRegistry" + } + } + } + }, + "ListSchemaRegistriesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + } + } + }, + "ListSchemaRegistriesResponse": { + "fields": { + "schemaRegistries": { + "rule": "repeated", + "type": "SchemaRegistry", + "id": 1 + } + } + }, + "CreateSchemaRegistryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "schemaRegistryId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schemaRegistry": { + "type": "SchemaRegistry", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteSchemaRegistryRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaRegistry" + } + } + } + }, + "GetContextRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaContext" + } + } + } + }, + "ListContextsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaRegistry" + } + } + } + }, + "GetSchemaRequest": { + "oneofs": { + "_subject": { + "oneof": [ + "subject" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Schema" + } + }, + "subject": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListSchemaTypesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + } + } + }, + "ListSchemaVersionsRequest": { + "oneofs": { + "_subject": { + "oneof": [ + "subject" + ] + }, + "_deleted": { + "oneof": [ + "deleted" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/Schema" + } + }, + "subject": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deleted": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListSubjectsRequest": { + "oneofs": { + "_subjectPrefix": { + "oneof": [ + "subjectPrefix" + ] + }, + "_deleted": { + "oneof": [ + "deleted" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "subjectPrefix": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deleted": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListSubjectsBySchemaIdRequest": { + "oneofs": { + "_subject": { + "oneof": [ + "subject" + ] + }, + "_deleted": { + "oneof": [ + "deleted" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "subject": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deleted": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListVersionsRequest": { + "oneofs": { + "_deleted": { + "oneof": [ + "deleted" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaSubject" + } + }, + "deleted": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DeleteSubjectRequest": { + "oneofs": { + "_permanent": { + "oneof": [ + "permanent" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaSubject" + } + }, + "permanent": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "GetVersionRequest": { + "oneofs": { + "_deleted": { + "oneof": [ + "deleted" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaVersion" + } + }, + "deleted": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CreateVersionRequest": { + "oneofs": { + "_version": { + "oneof": [ + "version" + ] + }, + "_id": { + "oneof": [ + "id" + ] + }, + "_schemaType": { + "oneof": [ + "schemaType" + ] + }, + "_normalize": { + "oneof": [ + "normalize" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaSubject" + } + }, + "version": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "id": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "schemaType": { + "type": "Schema.SchemaType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "schema": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "references": { + "rule": "repeated", + "type": "Schema.SchemaReference", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "normalize": { + "type": "bool", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CreateVersionResponse": { + "fields": { + "id": { + "type": "int32", + "id": 1 + } + } + }, + "LookupVersionRequest": { + "oneofs": { + "_schemaType": { + "oneof": [ + "schemaType" + ] + }, + "_normalize": { + "oneof": [ + "normalize" + ] + }, + "_deleted": { + "oneof": [ + "deleted" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaSubject" + } + }, + "schemaType": { + "type": "Schema.SchemaType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "schema": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "references": { + "rule": "repeated", + "type": "Schema.SchemaReference", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "normalize": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "deleted": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DeleteVersionRequest": { + "oneofs": { + "_permanent": { + "oneof": [ + "permanent" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaVersion" + } + }, + "permanent": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "ListReferencedSchemasRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaVersion" + } + } + } + }, + "CheckCompatibilityRequest": { + "oneofs": { + "_schemaType": { + "oneof": [ + "schemaType" + ] + }, + "_verbose": { + "oneof": [ + "verbose" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "*" + } + }, + "schemaType": { + "type": "Schema.SchemaType", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "schema": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "references": { + "rule": "repeated", + "type": "Schema.SchemaReference", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "verbose": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "CheckCompatibilityResponse": { + "fields": { + "isCompatible": { + "type": "bool", + "id": 1, + "options": { + "json_name": "is_compatible" + } + }, + "messages": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "GetSchemaConfigRequest": { + "oneofs": { + "_defaultToGlobal": { + "oneof": [ + "defaultToGlobal" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaConfig" + } + }, + "defaultToGlobal": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "UpdateSchemaConfigRequest": { + "oneofs": { + "_compatibility": { + "oneof": [ + "compatibility" + ] + }, + "_normalize": { + "oneof": [ + "normalize" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaConfig" + } + }, + "compatibility": { + "type": "SchemaConfig.CompatibilityType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "normalize": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "DeleteSchemaConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaConfig" + } + } + } + }, + "GetSchemaModeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaMode" + } + } + } + }, + "UpdateSchemaModeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaMode" + } + }, + "mode": { + "type": "SchemaMode.ModeType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteSchemaModeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaMode" + } + } + } + }, + "SchemaRegistry": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/SchemaRegistry", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}", + "(google.api.resource).plural": "schemaRegistries", + "(google.api.resource).singular": "schemaRegistry" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "contexts": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaContext" + } + } + } + }, + "Context": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/SchemaContext", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}", + "(google.api.resource).plural": "contexts", + "(google.api.resource).singular": "context" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "subjects": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaSubject" + } + } + } + }, + "Schema": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/Schema", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}", + "(google.api.resource).plural": "schemas", + "(google.api.resource).singular": "schema" + }, + "fields": { + "schemaType": { + "type": "SchemaType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaPayload": { + "type": "string", + "id": 2, + "options": { + "json_name": "schema" + } + }, + "references": { + "rule": "repeated", + "type": "SchemaReference", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SchemaReference": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "subject": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "version": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SchemaType": { + "values": { + "SCHEMA_TYPE_UNSPECIFIED": 0, + "AVRO": 1, + "JSON": 2, + "PROTOBUF": 3 + } + } + } + }, + "SchemaSubject": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/SchemaSubject", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}", + "(google.api.resource).singular": "subject", + "(google.api.resource).plural": "subjects" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "versions": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.resource_reference).type": "managedkafka.googleapis.com/SchemaVersion", + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SchemaVersion": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/SchemaVersion", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/compatibility/subjects/{subject}/versions/{version}", + "(google.api.resource).plural": "versions", + "(google.api.resource).singular": "version" + }, + "fields": { + "subject": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "versionId": { + "type": "int32", + "id": 2, + "options": { + "json_name": "version", + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schemaId": { + "type": "int32", + "id": 3, + "options": { + "json_name": "id", + "(google.api.field_behavior)": "REQUIRED" + } + }, + "schemaType": { + "type": "Schema.SchemaType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schemaPayload": { + "type": "string", + "id": 5, + "options": { + "json_name": "schema", + "(google.api.field_behavior)": "REQUIRED" + } + }, + "references": { + "rule": "repeated", + "type": "Schema.SchemaReference", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SchemaConfig": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/SchemaConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config/{subject}", + "(google.api.resource).plural": "configs", + "(google.api.resource).singular": "config" + }, + "oneofs": { + "_compatibility": { + "oneof": [ + "compatibility" + ] + }, + "_normalize": { + "oneof": [ + "normalize" + ] + } + }, + "fields": { + "compatibility": { + "type": "CompatibilityType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true + } + }, + "normalize": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "alias": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CompatibilityType": { + "values": { + "NONE": 0, + "BACKWARD": 1, + "BACKWARD_TRANSITIVE": 2, + "FORWARD": 3, + "FORWARD_TRANSITIVE": 4, + "FULL": 5, + "FULL_TRANSITIVE": 6 + } + } + } + }, + "SchemaMode": { + "options": { + "(google.api.resource).type": "managedkafka.googleapis.com/SchemaMode", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}", + "(google.api.resource).plural": "modes", + "(google.api.resource).singular": "mode" + }, + "fields": { + "mode": { + "type": "ModeType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "ModeType": { + "values": { + "NONE": 0, + "READONLY": 1, + "READWRITE": 2, + "IMPORT": 3 + } + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "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 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "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 + } + }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "HttpBody": { + "fields": { + "contentType": { + "type": "string", + "id": 1 + }, + "data": { + "type": "bytes", + "id": 2 + }, + "extensions": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + "php_generic_services", + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false, + "deprecated": true + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, + "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 + } + } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } + } + }, + "extensions": [ + [ + 1000, + 9994 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + }, + "reserved": [ + [ + 1, + 1 + ] + ] + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "overridableFeatures": { + "type": "FeatureSet", + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 + } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/README.md b/packages/google-cloud-managedkafka-schemaregistry/samples/README.md new file mode 100644 index 000000000000..16c2a780ef5b --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/README.md @@ -0,0 +1,536 @@ +[//]: # "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 + +# [Managed Service for Apache Kafka 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) + * [Managed_schema_registry.check_compatibility](#managed_schema_registry.check_compatibility) + * [Managed_schema_registry.create_schema_registry](#managed_schema_registry.create_schema_registry) + * [Managed_schema_registry.create_version](#managed_schema_registry.create_version) + * [Managed_schema_registry.delete_schema_config](#managed_schema_registry.delete_schema_config) + * [Managed_schema_registry.delete_schema_mode](#managed_schema_registry.delete_schema_mode) + * [Managed_schema_registry.delete_schema_registry](#managed_schema_registry.delete_schema_registry) + * [Managed_schema_registry.delete_subject](#managed_schema_registry.delete_subject) + * [Managed_schema_registry.delete_version](#managed_schema_registry.delete_version) + * [Managed_schema_registry.get_context](#managed_schema_registry.get_context) + * [Managed_schema_registry.get_raw_schema](#managed_schema_registry.get_raw_schema) + * [Managed_schema_registry.get_raw_schema_version](#managed_schema_registry.get_raw_schema_version) + * [Managed_schema_registry.get_schema](#managed_schema_registry.get_schema) + * [Managed_schema_registry.get_schema_config](#managed_schema_registry.get_schema_config) + * [Managed_schema_registry.get_schema_mode](#managed_schema_registry.get_schema_mode) + * [Managed_schema_registry.get_schema_registry](#managed_schema_registry.get_schema_registry) + * [Managed_schema_registry.get_version](#managed_schema_registry.get_version) + * [Managed_schema_registry.list_contexts](#managed_schema_registry.list_contexts) + * [Managed_schema_registry.list_referenced_schemas](#managed_schema_registry.list_referenced_schemas) + * [Managed_schema_registry.list_schema_registries](#managed_schema_registry.list_schema_registries) + * [Managed_schema_registry.list_schema_types](#managed_schema_registry.list_schema_types) + * [Managed_schema_registry.list_schema_versions](#managed_schema_registry.list_schema_versions) + * [Managed_schema_registry.list_subjects](#managed_schema_registry.list_subjects) + * [Managed_schema_registry.list_subjects_by_schema_id](#managed_schema_registry.list_subjects_by_schema_id) + * [Managed_schema_registry.list_versions](#managed_schema_registry.list_versions) + * [Managed_schema_registry.lookup_version](#managed_schema_registry.lookup_version) + * [Managed_schema_registry.update_schema_config](#managed_schema_registry.update_schema_config) + * [Managed_schema_registry.update_schema_mode](#managed_schema_registry.update_schema_mode) + * [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 + + + +### Managed_schema_registry.check_compatibility + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js` + + +----- + + + + +### Managed_schema_registry.create_schema_registry + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js` + + +----- + + + + +### Managed_schema_registry.create_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js` + + +----- + + + + +### Managed_schema_registry.delete_schema_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js` + + +----- + + + + +### Managed_schema_registry.delete_schema_mode + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js` + + +----- + + + + +### Managed_schema_registry.delete_schema_registry + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js` + + +----- + + + + +### Managed_schema_registry.delete_subject + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js` + + +----- + + + + +### Managed_schema_registry.delete_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js` + + +----- + + + + +### Managed_schema_registry.get_context + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js` + + +----- + + + + +### Managed_schema_registry.get_raw_schema + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js` + + +----- + + + + +### Managed_schema_registry.get_raw_schema_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js` + + +----- + + + + +### Managed_schema_registry.get_schema + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js` + + +----- + + + + +### Managed_schema_registry.get_schema_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js` + + +----- + + + + +### Managed_schema_registry.get_schema_mode + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js` + + +----- + + + + +### Managed_schema_registry.get_schema_registry + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js` + + +----- + + + + +### Managed_schema_registry.get_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js` + + +----- + + + + +### Managed_schema_registry.list_contexts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js` + + +----- + + + + +### Managed_schema_registry.list_referenced_schemas + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js` + + +----- + + + + +### Managed_schema_registry.list_schema_registries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js` + + +----- + + + + +### Managed_schema_registry.list_schema_types + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js` + + +----- + + + + +### Managed_schema_registry.list_schema_versions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js` + + +----- + + + + +### Managed_schema_registry.list_subjects + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js` + + +----- + + + + +### Managed_schema_registry.list_subjects_by_schema_id + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js` + + +----- + + + + +### Managed_schema_registry.list_versions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js` + + +----- + + + + +### Managed_schema_registry.lookup_version + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js` + + +----- + + + + +### Managed_schema_registry.update_schema_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js` + + +----- + + + + +### Managed_schema_registry.update_schema_mode + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-managedkafka-schemaregistry/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-managedkafka-schemaregistry/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-managedkafka-schemaregistry/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://cloud.google.com/managed-service-for-apache-kafka/docs diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js new file mode 100644 index 000000000000..7ab0d70367b2 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.check_compatibility.js @@ -0,0 +1,84 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, schema) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_CheckCompatibility_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the resource to check compatibility for. The format + * is either of following: + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/* /versions: Check compatibility with one or + * more versions of the specified subject. + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions/{version}: Check + * compatibility with a specific version of the subject. + */ + // const name = 'abc123' + /** + * Optional. The schema type of the schema. + */ + // const schemaType = {} + /** + * Required. The schema payload + */ + // const schema = 'abc123' + /** + * Optional. The schema references used by the schema. + */ + // const references = [1,2,3,4] + /** + * Optional. If true, the response will contain the compatibility check result + * with reasons for failed checks. The default is false. + */ + // const verbose = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callCheckCompatibility() { + // Construct request + const request = { + name, + schema, + }; + + // Run request + const response = await schemaregistryClient.checkCompatibility(request); + console.log(response); + } + + callCheckCompatibility(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_CheckCompatibility_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js new file mode 100644 index 000000000000..283fabd0beeb --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_schema_registry.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, schemaRegistryId, schemaRegistry) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_CreateSchemaRegistry_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 whose schema registry instance is to be created. + * Structured like: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + /** + * Required. The schema registry instance ID to use for this schema registry. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores + * (-). The maximum length is 63 characters. + * The ID must not start with a number. + */ + // const schemaRegistryId = 'abc123' + /** + * Required. The schema registry instance to create. + * The name field is ignored. + */ + // const schemaRegistry = {} + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callCreateSchemaRegistry() { + // Construct request + const request = { + parent, + schemaRegistryId, + schemaRegistry, + }; + + // Run request + const response = await schemaregistryClient.createSchemaRegistry(request); + console.log(response); + } + + callCreateSchemaRegistry(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_CreateSchemaRegistry_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js new file mode 100644 index 000000000000..1fd318ba304b --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.create_version.js @@ -0,0 +1,96 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, schema) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_CreateVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject to create the version for. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + */ + // const parent = 'abc123' + /** + * Optional. The version to create. It is optional. If not specified, the + * version will be created with the max version ID of the subject increased + * by 1. If the version ID is specified, it will be used as the new version ID + * and must not be used by an existing version of the subject. + */ + // const version = 1234 + /** + * Optional. The schema ID of the schema. If not specified, the schema ID will + * be generated by the server. If the schema ID is specified, it must not be + * used by an existing schema that is different from the schema to be created. + */ + // const id = 1234 + /** + * Optional. The type of the schema. It is optional. If not specified, the + * schema type will be AVRO. + */ + // const schemaType = {} + /** + * Required. The schema payload + */ + // const schema = 'abc123' + /** + * Optional. The schema references used by the schema. + */ + // const references = [1,2,3,4] + /** + * Optional. If true, the schema will be normalized before being stored. The + * default is false. + */ + // const normalize = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callCreateVersion() { + // Construct request + const request = { + parent, + schema, + }; + + // Run request + const response = await schemaregistryClient.createVersion(request); + console.log(response); + } + + callCreateVersion(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_CreateVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js new file mode 100644 index 000000000000..5aa7ed684ca5 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_config.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject to delete the config for. The format + * is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject} + */ + // const name = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callDeleteSchemaConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.deleteSchemaConfig(request); + console.log(response); + } + + callDeleteSchemaConfig(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js new file mode 100644 index 000000000000..5d4695b61140 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_mode.js @@ -0,0 +1,64 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaMode_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject to delete the mode for. The format + * is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject} + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject} + */ + // const name = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callDeleteSchemaMode() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.deleteSchemaMode(request); + console.log(response); + } + + callDeleteSchemaMode(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaMode_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js new file mode 100644 index 000000000000..45594973da29 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_schema_registry.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaRegistry_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema registry instance to delete. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + */ + // const name = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callDeleteSchemaRegistry() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.deleteSchemaRegistry(request); + console.log(response); + } + + callDeleteSchemaRegistry(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaRegistry_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js new file mode 100644 index 000000000000..c38d09317e61 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_subject.js @@ -0,0 +1,72 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSubject_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject to delete. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + */ + // const name = 'abc123' + /** + * Optional. If true, the subject and all associated metadata including the + * schema ID will be deleted permanently. Otherwise, only the subject is + * soft-deleted. The default is false. Soft-deleted subjects can still be + * searched in ListSubjects API call with deleted=true query parameter. A + * soft-delete of a subject must be performed before a hard-delete. + */ + // const permanent = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callDeleteSubject() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.deleteSubject(request); + console.log(response); + } + + callDeleteSubject(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSubject_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js new file mode 100644 index 000000000000..dc860a6a12cc --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.delete_version.js @@ -0,0 +1,72 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_DeleteVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject version to delete. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + */ + // const name = 'abc123' + /** + * Optional. If true, both the version and the referenced schema ID will be + * permanently deleted. The default is false. If false, the version will be + * deleted but the schema ID will be retained. Soft-deleted versions can still + * be searched in ListVersions API call with deleted=true query parameter. A + * soft-delete of a version must be performed before a hard-delete. + */ + // const permanent = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callDeleteVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.deleteVersion(request); + console.log(response); + } + + callDeleteVersion(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_DeleteVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js new file mode 100644 index 000000000000..c03ffe8bd6b9 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_context.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetContext_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 context to return. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + */ + // const name = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetContext() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getContext(request); + console.log(response); + } + + callGetContext(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetContext_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js new file mode 100644 index 000000000000..7a9ed6cb0a8d --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchema_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema to return. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + */ + // const name = 'abc123' + /** + * Optional. Used to limit the search for the schema ID to a specific subject, + * otherwise the schema ID will be searched for in all subjects in the given + * specified context. + */ + // const subject = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetRawSchema() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getRawSchema(request); + console.log(response); + } + + callGetRawSchema(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchema_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js new file mode 100644 index 000000000000..49db0c18f37e --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_raw_schema_version.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchemaVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject to return versions. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + */ + // const name = 'abc123' + /** + * Optional. If true, no matter if the subject/version is soft-deleted or not, + * it returns the version details. If false, it returns NOT_FOUND error if the + * subject/version is soft-deleted. The default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetRawSchemaVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getRawSchemaVersion(request); + console.log(response); + } + + callGetRawSchemaVersion(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchemaVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js new file mode 100644 index 000000000000..398f68a9c4e1 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetSchema_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema to return. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + */ + // const name = 'abc123' + /** + * Optional. Used to limit the search for the schema ID to a specific subject, + * otherwise the schema ID will be searched for in all subjects in the given + * specified context. + */ + // const subject = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetSchema() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getSchema(request); + console.log(response); + } + + callGetSchema(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchema_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js new file mode 100644 index 000000000000..3e4726ecb385 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_config.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 to get the config for. It can be either of + * following: + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config: Get config at global level. + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}: Get config for a specific subject. + */ + // const name = 'abc123' + /** + * Optional. If true, the config will fall back to the config at the global + * level if no subject level config is found. + */ + // const defaultToGlobal = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetSchemaConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getSchemaConfig(request); + console.log(response); + } + + callGetSchemaConfig(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js new file mode 100644 index 000000000000..a52d6f39c291 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_mode.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaMode_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 mode. The format is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context + */ + // const name = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetSchemaMode() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getSchemaMode(request); + console.log(response); + } + + callGetSchemaMode(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaMode_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js new file mode 100644 index 000000000000..fdb353e97bb3 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_schema_registry.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaRegistry_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema registry instance to return. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + */ + // const name = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetSchemaRegistry() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getSchemaRegistry(request); + console.log(response); + } + + callGetSchemaRegistry(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaRegistry_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js new file mode 100644 index 000000000000..c6f02f4cca95 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.get_version.js @@ -0,0 +1,70 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_GetVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject to return versions. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + */ + // const name = 'abc123' + /** + * Optional. If true, no matter if the subject/version is soft-deleted or not, + * it returns the version details. If false, it returns NOT_FOUND error if the + * subject/version is soft-deleted. The default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callGetVersion() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await schemaregistryClient.getVersion(request); + console.log(response); + } + + callGetVersion(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_GetVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js new file mode 100644 index 000000000000..13b16ecdfa45 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_contexts.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_ListContexts_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 of the contexts. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + */ + // const parent = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListContexts() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listContexts(request); + console.log(response); + } + + callListContexts(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListContexts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js new file mode 100644 index 000000000000..de1a2f202801 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_referenced_schemas.js @@ -0,0 +1,64 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListReferencedSchemas_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 version to list referenced by. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + */ + // const parent = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListReferencedSchemas() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listReferencedSchemas(request); + console.log(response); + } + + callListReferencedSchemas(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListReferencedSchemas_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js new file mode 100644 index 000000000000..cdf467226219 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_registries.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaRegistries_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 whose schema registry instances are to be listed. + * Structured like: `projects/{project}/locations/{location}` + */ + // const parent = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListSchemaRegistries() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listSchemaRegistries(request); + console.log(response); + } + + callListSchemaRegistries(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaRegistries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js new file mode 100644 index 000000000000..fc6371860175 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_types.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaTypes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema registry whose schema types are to be listed. + * Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + */ + // const parent = 'abc123' + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListSchemaTypes() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listSchemaTypes(request); + console.log(response); + } + + callListSchemaTypes(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaTypes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js new file mode 100644 index 000000000000..8acaa58865b7 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_schema_versions.js @@ -0,0 +1,74 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema whose schema versions are to be listed. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + */ + // const parent = 'abc123' + /** + * Optional. The subject to filter the subjects by. + */ + // const subject = 'abc123' + /** + * Optional. If true, the response will include soft-deleted versions of the + * schema, even if the subject is soft-deleted. The default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListSchemaVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listSchemaVersions(request); + console.log(response); + } + + callListSchemaVersions(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js new file mode 100644 index 000000000000..bf0e0cbc6e90 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects.js @@ -0,0 +1,78 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjects_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema registry/context whose subjects are to be + * listed. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + */ + // const parent = 'abc123' + /** + * Optional. The context to filter the subjects by, in the format of + * `:.{context}:`. If unset, all subjects in the registry are returned. Set to + * empty string or add as + * '?subjectPrefix=' at the end of this request to list subjects in the + * default context. + */ + // const subjectPrefix = 'abc123' + /** + * Optional. If true, the response will include soft-deleted subjects. The + * default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListSubjects() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listSubjects(request); + console.log(response); + } + + callListSubjects(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjects_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js new file mode 100644 index 000000000000..156f4bd14974 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_subjects_by_schema_id.js @@ -0,0 +1,74 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjectsBySchemaId_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 schema resource whose associated subjects are to be listed. + * Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + */ + // const parent = 'abc123' + /** + * Optional. The subject to filter the subjects by. + */ + // const subject = 'abc123' + /** + * Optional. If true, the response will include soft-deleted subjects. The + * default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListSubjectsBySchemaId() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listSubjectsBySchemaId(request); + console.log(response); + } + + callListSubjectsBySchemaId(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjectsBySchemaId_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js new file mode 100644 index 000000000000..0436df8d19ce --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.list_versions.js @@ -0,0 +1,69 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_ListVersions_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject whose versions are to be listed. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + */ + // const parent = 'abc123' + /** + * Optional. If true, the response will include soft-deleted versions of an + * active or soft-deleted subject. The default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listVersions(request); + console.log(response); + } + + callListVersions(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_ListVersions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js new file mode 100644 index 000000000000..837392ef86d8 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.lookup_version.js @@ -0,0 +1,88 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, schema) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_LookupVersion_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 subject to lookup the schema in. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + */ + // const parent = 'abc123' + /** + * Optional. The schema type of the schema. + */ + // const schemaType = {} + /** + * Required. The schema payload + */ + // const schema = 'abc123' + /** + * Optional. The schema references used by the schema. + */ + // const references = [1,2,3,4] + /** + * Optional. If true, the schema will be normalized before being looked up. + * The default is false. + */ + // const normalize = true + /** + * Optional. If true, soft-deleted versions will be included in lookup, no + * matter if the subject is active or soft-deleted. If false, soft-deleted + * versions will be excluded. The default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callLookupVersion() { + // Construct request + const request = { + parent, + schema, + }; + + // Run request + const response = await schemaregistryClient.lookupVersion(request); + console.log(response); + } + + callLookupVersion(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_LookupVersion_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js new file mode 100644 index 000000000000..fb8a09f40c5e --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_config.js @@ -0,0 +1,79 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, compatibility) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 to update the config for. It can be either of + * following: + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config: Update config at global level. + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}: Update config for a specific subject. + */ + // const name = 'abc123' + /** + * Required. The compatibility type of the schemas. + * Cannot be unset for a SchemaRegistry-level SchemaConfig. + * If unset on a SchemaSubject-level SchemaConfig, removes the compatibility + * field for the SchemaConfig. + */ + // const compatibility = {} + /** + * Optional. If true, the schema will be normalized before being stored or + * looked up. The default is false. Cannot be unset for a SchemaRegistry-level + * SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the + * normalize field for the SchemaConfig. + */ + // const normalize = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callUpdateSchemaConfig() { + // Construct request + const request = { + name, + compatibility, + }; + + // Run request + const response = await schemaregistryClient.updateSchemaConfig(request); + console.log(response); + } + + callUpdateSchemaConfig(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js new file mode 100644 index 000000000000..0d8d69e42f76 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/managed_schema_registry.update_schema_mode.js @@ -0,0 +1,68 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, mode) { + // [START managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaMode_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 mode. The format is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context + */ + // const name = 'abc123' + /** + * Required. The mode type. + */ + // const mode = {} + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callUpdateSchemaMode() { + // Construct request + const request = { + name, + mode, + }; + + // Run request + const response = await schemaregistryClient.updateSchemaMode(request); + console.log(response); + } + + callUpdateSchemaMode(); + // [END managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaMode_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json new file mode 100644 index 000000000000..19d835c8abf0 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/generated/v1/snippet_metadata_google.cloud.managedkafka.schemaregistry.v1.json @@ -0,0 +1,1231 @@ +{ + "clientLibrary": { + "name": "nodejs-schemaregistry", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.managedkafka.schemaregistry.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaRegistry_async", + "title": "ManagedSchemaRegistry getSchemaRegistry Sample", + "origin": "API_DEFINITION", + "description": " Get the schema registry instance.", + "canonical": true, + "file": "managed_schema_registry.get_schema_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaRegistry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaRegistry", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaRegistries_async", + "title": "ManagedSchemaRegistry listSchemaRegistries Sample", + "origin": "API_DEFINITION", + "description": " List schema registries.", + "canonical": true, + "file": "managed_schema_registry.list_schema_registries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSchemaRegistries", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaRegistries", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListSchemaRegistries", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaRegistries", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_CreateSchemaRegistry_async", + "title": "ManagedSchemaRegistry createSchemaRegistry Sample", + "origin": "API_DEFINITION", + "description": " Create a schema registry instance.", + "canonical": true, + "file": "managed_schema_registry.create_schema_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateSchemaRegistry", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "schema_registry_id", + "type": "TYPE_STRING" + }, + { + "name": "schema_registry", + "type": ".google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "CreateSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateSchemaRegistry", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaRegistry_async", + "title": "ManagedSchemaRegistry deleteSchemaRegistry Sample", + "origin": "API_DEFINITION", + "description": " Delete a schema registry instance.", + "canonical": true, + "file": "managed_schema_registry.delete_schema_registry.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaRegistry", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "DeleteSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaRegistry", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetContext_async", + "title": "ManagedSchemaRegistry getContext Sample", + "origin": "API_DEFINITION", + "description": " Get the context.", + "canonical": true, + "file": "managed_schema_registry.get_context.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetContext", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetContext", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.Context", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetContext", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetContext", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListContexts_async", + "title": "ManagedSchemaRegistry listContexts Sample", + "origin": "API_DEFINITION", + "description": " List contexts for a schema registry.", + "canonical": true, + "file": "managed_schema_registry.list_contexts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListContexts", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListContexts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListContexts", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListContexts", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchema_async", + "title": "ManagedSchemaRegistry getSchema Sample", + "origin": "API_DEFINITION", + "description": " Get the schema for the given schema id.", + "canonical": true, + "file": "managed_schema_registry.get_schema.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSchema", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchema", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "subject", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.Schema", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetSchema", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchema", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchema_async", + "title": "ManagedSchemaRegistry getRawSchema Sample", + "origin": "API_DEFINITION", + "description": " Get the schema string for the given schema id. The response will be the schema string.", + "canonical": true, + "file": "managed_schema_registry.get_raw_schema.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRawSchema", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchema", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "subject", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetRawSchema", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchema", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaVersions_async", + "title": "ManagedSchemaRegistry listSchemaVersions Sample", + "origin": "API_DEFINITION", + "description": " List the schema versions for the given schema id. The response will be an array of subject-version pairs as: [{\"subject\":\"subject1\", \"version\":1}, {\"subject\":\"subject2\", \"version\":2}].", + "canonical": true, + "file": "managed_schema_registry.list_schema_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSchemaVersions", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "subject", + "type": "TYPE_STRING" + }, + { + "name": "deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListSchemaVersions", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaVersions", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaTypes_async", + "title": "ManagedSchemaRegistry listSchemaTypes Sample", + "origin": "API_DEFINITION", + "description": " List the supported schema types. The response will be an array of schema types.", + "canonical": true, + "file": "managed_schema_registry.list_schema_types.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSchemaTypes", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaTypes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListSchemaTypes", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSchemaTypes", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjects_async", + "title": "ManagedSchemaRegistry listSubjects Sample", + "origin": "API_DEFINITION", + "description": " List subjects in the schema registry. The response will be an array of subject names.", + "canonical": true, + "file": "managed_schema_registry.list_subjects.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSubjects", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjects", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "subject_prefix", + "type": "TYPE_STRING" + }, + { + "name": "deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListSubjects", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjects", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjectsBySchemaId_async", + "title": "ManagedSchemaRegistry listSubjectsBySchemaId Sample", + "origin": "API_DEFINITION", + "description": " List subjects which reference a particular schema id. The response will be an array of subject names.", + "canonical": true, + "file": "managed_schema_registry.list_subjects_by_schema_id.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListSubjectsBySchemaId", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjectsBySchemaId", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "subject", + "type": "TYPE_STRING" + }, + { + "name": "deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListSubjectsBySchemaId", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListSubjectsBySchemaId", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSubject_async", + "title": "ManagedSchemaRegistry deleteSubject Sample", + "origin": "API_DEFINITION", + "description": " Delete a subject. The response will be an array of versions of the deleted subject.", + "canonical": true, + "file": "managed_schema_registry.delete_subject.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSubject", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSubject", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "permanent", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "DeleteSubject", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSubject", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_LookupVersion_async", + "title": "ManagedSchemaRegistry lookupVersion Sample", + "origin": "API_DEFINITION", + "description": " Lookup a schema under the specified subject.", + "canonical": true, + "file": "managed_schema_registry.lookup_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "LookupVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.LookupVersion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "schema_type", + "type": ".google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType" + }, + { + "name": "schema", + "type": "TYPE_STRING" + }, + { + "name": "references", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "normalize", + "type": "TYPE_BOOL" + }, + { + "name": "deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaVersion", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "LookupVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.LookupVersion", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetVersion_async", + "title": "ManagedSchemaRegistry getVersion Sample", + "origin": "API_DEFINITION", + "description": " Get a versioned schema (schema with subject/version) of a subject.", + "canonical": true, + "file": "managed_schema_registry.get_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaVersion", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetVersion", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchemaVersion_async", + "title": "ManagedSchemaRegistry getRawSchemaVersion Sample", + "origin": "API_DEFINITION", + "description": " Get the schema string only for a version of a subject. The response will be the schema string.", + "canonical": true, + "file": "managed_schema_registry.get_raw_schema_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetRawSchemaVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchemaVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetRawSchemaVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetRawSchemaVersion", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListVersions_async", + "title": "ManagedSchemaRegistry listVersions Sample", + "origin": "API_DEFINITION", + "description": " Get all versions of a subject. The response will be an array of versions of the subject.", + "canonical": true, + "file": "managed_schema_registry.list_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListVersions", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListVersions", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListVersions", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_CreateVersion_async", + "title": "ManagedSchemaRegistry createVersion Sample", + "origin": "API_DEFINITION", + "description": " Register a new version under a given subject with the given schema.", + "canonical": true, + "file": "managed_schema_registry.create_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 88, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateVersion", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "version", + "type": "TYPE_INT32" + }, + { + "name": "id", + "type": "TYPE_INT32" + }, + { + "name": "schema_type", + "type": ".google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType" + }, + { + "name": "schema", + "type": "TYPE_STRING" + }, + { + "name": "references", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "normalize", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "CreateVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CreateVersion", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteVersion_async", + "title": "ManagedSchemaRegistry deleteVersion Sample", + "origin": "API_DEFINITION", + "description": " Delete a version of a subject. The response will be the deleted version id.", + "canonical": true, + "file": "managed_schema_registry.delete_version.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteVersion", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "permanent", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "DeleteVersion", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteVersion", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_ListReferencedSchemas_async", + "title": "ManagedSchemaRegistry listReferencedSchemas Sample", + "origin": "API_DEFINITION", + "description": " Get a list of IDs of schemas that reference the schema with the given subject and version.", + "canonical": true, + "file": "managed_schema_registry.list_referenced_schemas.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReferencedSchemas", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListReferencedSchemas", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.api.HttpBody", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "ListReferencedSchemas", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.ListReferencedSchemas", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_CheckCompatibility_async", + "title": "ManagedSchemaRegistry checkCompatibility Sample", + "origin": "API_DEFINITION", + "description": " Check compatibility of a schema with all versions or a specific version of a subject.", + "canonical": true, + "file": "managed_schema_registry.check_compatibility.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckCompatibility", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CheckCompatibility", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "schema_type", + "type": ".google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType" + }, + { + "name": "schema", + "type": "TYPE_STRING" + }, + { + "name": "references", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "verbose", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "CheckCompatibility", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.CheckCompatibility", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaConfig_async", + "title": "ManagedSchemaRegistry getSchemaConfig Sample", + "origin": "API_DEFINITION", + "description": " Get schema config at global level or for a subject.", + "canonical": true, + "file": "managed_schema_registry.get_schema_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSchemaConfig", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "default_to_global", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaConfig", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetSchemaConfig", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaConfig", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaConfig_async", + "title": "ManagedSchemaRegistry updateSchemaConfig Sample", + "origin": "API_DEFINITION", + "description": " Update config at global level or for a subject. Creates a SchemaSubject-level SchemaConfig if it does not exist.", + "canonical": true, + "file": "managed_schema_registry.update_schema_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSchemaConfig", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "compatibility", + "type": ".google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType" + }, + { + "name": "normalize", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaConfig", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "UpdateSchemaConfig", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaConfig", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaConfig_async", + "title": "ManagedSchemaRegistry deleteSchemaConfig Sample", + "origin": "API_DEFINITION", + "description": " Delete schema config for a subject.", + "canonical": true, + "file": "managed_schema_registry.delete_schema_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSchemaConfig", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaConfig", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "DeleteSchemaConfig", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaConfig", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaMode_async", + "title": "ManagedSchemaRegistry getSchemaMode Sample", + "origin": "API_DEFINITION", + "description": " Get mode at global level or for a subject.", + "canonical": true, + "file": "managed_schema_registry.get_schema_mode.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetSchemaMode", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaMode", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaMode", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "GetSchemaMode", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.GetSchemaMode", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaMode_async", + "title": "ManagedSchemaRegistry updateSchemaMode Sample", + "origin": "API_DEFINITION", + "description": " Update mode at global level or for a subject.", + "canonical": true, + "file": "managed_schema_registry.update_schema_mode.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateSchemaMode", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaMode", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "mode", + "type": ".google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaMode", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "UpdateSchemaMode", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.UpdateSchemaMode", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + }, + { + "regionTag": "managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaMode_async", + "title": "ManagedSchemaRegistry deleteSchemaMode Sample", + "origin": "API_DEFINITION", + "description": " Delete schema mode for a subject.", + "canonical": true, + "file": "managed_schema_registry.delete_schema_mode.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteSchemaMode", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaMode", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.managedkafka.schemaregistry.v1.SchemaMode", + "client": { + "shortName": "ManagedSchemaRegistryClient", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistryClient" + }, + "method": { + "shortName": "DeleteSchemaMode", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry.DeleteSchemaMode", + "service": { + "shortName": "ManagedSchemaRegistry", + "fullName": "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-managedkafka-schemaregistry/samples/quickstart.js b/packages/google-cloud-managedkafka-schemaregistry/samples/quickstart.js new file mode 100644 index 000000000000..58bb5d39b84b --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/samples/quickstart.js @@ -0,0 +1,74 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 managedkafka_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 schema whose schema versions are to be listed. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + */ + // const parent = 'abc123' + /** + * Optional. The subject to filter the subjects by. + */ + // const subject = 'abc123' + /** + * Optional. If true, the response will include soft-deleted versions of the + * schema, even if the subject is soft-deleted. The default is false. + */ + // const deleted = true + + // Imports the Schemaregistry library + const {ManagedSchemaRegistryClient} = require('@google-cloud/managedkafka-schemaregistry').v1; + + // Instantiates a client + const schemaregistryClient = new ManagedSchemaRegistryClient(); + + async function callListSchemaVersions() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await schemaregistryClient.listSchemaVersions(request); + console.log(response); + } + + callListSchemaVersions(); + // [END managedkafka_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-managedkafka-schemaregistry/src/index.ts b/packages/google-cloud-managedkafka-schemaregistry/src/index.ts new file mode 100644 index 000000000000..f27db965c1a9 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v1 from './v1'; + +const ManagedSchemaRegistryClient = v1.ManagedSchemaRegistryClient; +type ManagedSchemaRegistryClient = v1.ManagedSchemaRegistryClient; + +export {v1, ManagedSchemaRegistryClient}; +export default {v1, ManagedSchemaRegistryClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-managedkafka-schemaregistry/src/v1/gapic_metadata.json b/packages/google-cloud-managedkafka-schemaregistry/src/v1/gapic_metadata.json new file mode 100644 index 000000000000..b8ef006a0999 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/src/v1/gapic_metadata.json @@ -0,0 +1,293 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.managedkafka.schemaregistry.v1", + "libraryPackage": "@google-cloud/managedkafka-schemaregistry", + "services": { + "ManagedSchemaRegistry": { + "clients": { + "grpc": { + "libraryClient": "ManagedSchemaRegistryClient", + "rpcs": { + "GetSchemaRegistry": { + "methods": [ + "getSchemaRegistry" + ] + }, + "ListSchemaRegistries": { + "methods": [ + "listSchemaRegistries" + ] + }, + "CreateSchemaRegistry": { + "methods": [ + "createSchemaRegistry" + ] + }, + "DeleteSchemaRegistry": { + "methods": [ + "deleteSchemaRegistry" + ] + }, + "GetContext": { + "methods": [ + "getContext" + ] + }, + "ListContexts": { + "methods": [ + "listContexts" + ] + }, + "GetSchema": { + "methods": [ + "getSchema" + ] + }, + "GetRawSchema": { + "methods": [ + "getRawSchema" + ] + }, + "ListSchemaVersions": { + "methods": [ + "listSchemaVersions" + ] + }, + "ListSchemaTypes": { + "methods": [ + "listSchemaTypes" + ] + }, + "ListSubjects": { + "methods": [ + "listSubjects" + ] + }, + "ListSubjectsBySchemaId": { + "methods": [ + "listSubjectsBySchemaId" + ] + }, + "DeleteSubject": { + "methods": [ + "deleteSubject" + ] + }, + "LookupVersion": { + "methods": [ + "lookupVersion" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "GetRawSchemaVersion": { + "methods": [ + "getRawSchemaVersion" + ] + }, + "ListVersions": { + "methods": [ + "listVersions" + ] + }, + "CreateVersion": { + "methods": [ + "createVersion" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, + "ListReferencedSchemas": { + "methods": [ + "listReferencedSchemas" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "GetSchemaConfig": { + "methods": [ + "getSchemaConfig" + ] + }, + "UpdateSchemaConfig": { + "methods": [ + "updateSchemaConfig" + ] + }, + "DeleteSchemaConfig": { + "methods": [ + "deleteSchemaConfig" + ] + }, + "GetSchemaMode": { + "methods": [ + "getSchemaMode" + ] + }, + "UpdateSchemaMode": { + "methods": [ + "updateSchemaMode" + ] + }, + "DeleteSchemaMode": { + "methods": [ + "deleteSchemaMode" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ManagedSchemaRegistryClient", + "rpcs": { + "GetSchemaRegistry": { + "methods": [ + "getSchemaRegistry" + ] + }, + "ListSchemaRegistries": { + "methods": [ + "listSchemaRegistries" + ] + }, + "CreateSchemaRegistry": { + "methods": [ + "createSchemaRegistry" + ] + }, + "DeleteSchemaRegistry": { + "methods": [ + "deleteSchemaRegistry" + ] + }, + "GetContext": { + "methods": [ + "getContext" + ] + }, + "ListContexts": { + "methods": [ + "listContexts" + ] + }, + "GetSchema": { + "methods": [ + "getSchema" + ] + }, + "GetRawSchema": { + "methods": [ + "getRawSchema" + ] + }, + "ListSchemaVersions": { + "methods": [ + "listSchemaVersions" + ] + }, + "ListSchemaTypes": { + "methods": [ + "listSchemaTypes" + ] + }, + "ListSubjects": { + "methods": [ + "listSubjects" + ] + }, + "ListSubjectsBySchemaId": { + "methods": [ + "listSubjectsBySchemaId" + ] + }, + "DeleteSubject": { + "methods": [ + "deleteSubject" + ] + }, + "LookupVersion": { + "methods": [ + "lookupVersion" + ] + }, + "GetVersion": { + "methods": [ + "getVersion" + ] + }, + "GetRawSchemaVersion": { + "methods": [ + "getRawSchemaVersion" + ] + }, + "ListVersions": { + "methods": [ + "listVersions" + ] + }, + "CreateVersion": { + "methods": [ + "createVersion" + ] + }, + "DeleteVersion": { + "methods": [ + "deleteVersion" + ] + }, + "ListReferencedSchemas": { + "methods": [ + "listReferencedSchemas" + ] + }, + "CheckCompatibility": { + "methods": [ + "checkCompatibility" + ] + }, + "GetSchemaConfig": { + "methods": [ + "getSchemaConfig" + ] + }, + "UpdateSchemaConfig": { + "methods": [ + "updateSchemaConfig" + ] + }, + "DeleteSchemaConfig": { + "methods": [ + "deleteSchemaConfig" + ] + }, + "GetSchemaMode": { + "methods": [ + "getSchemaMode" + ] + }, + "UpdateSchemaMode": { + "methods": [ + "updateSchemaMode" + ] + }, + "DeleteSchemaMode": { + "methods": [ + "deleteSchemaMode" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/src/v1/index.ts b/packages/google-cloud-managedkafka-schemaregistry/src/v1/index.ts new file mode 100644 index 000000000000..522ee6f7f5bf --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/src/v1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {ManagedSchemaRegistryClient} from './managed_schema_registry_client'; diff --git a/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_client.ts b/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_client.ts new file mode 100644 index 000000000000..6055217ff250 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_client.ts @@ -0,0 +1,4332 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, LocationsClient, LocationProtos} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1/managed_schema_registry_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './managed_schema_registry_client_config.json'; +const version = require('../../../package.json').version; + +/** + * SchemaRegistry is a service that allows users to manage schemas for their + * Kafka clusters. It provides APIs to register, list, and delete schemas, as + * well as to get the schema for a given schema id or a given version id under a + * subject, to update the global or subject-specific compatibility mode, and to + * check the compatibility of a schema against a subject or a version. The main + * resource hierarchy is as follows: + * + * * SchemaRegistry + * * SchemaRegistry/Context + * * SchemaRegistry/Context/Schema + * * SchemaRegistry/Context/Subject + * * SchemaRegistry/Context/Subject/Version + * * SchemaRegistry/Config + * * SchemaRegistry/Mode + * + * **SchemaRegistry** is the root resource to represent a schema registry + * instance. A customer can have multiple schema registry instances in a + * project. + * + * **Context** is a context resource that represents a group of + * schemas, subjects and versions. A schema registry instance can have multiple + * contexts and always has a 'default' context. Contexts are independent of each + * other. Context is optional and if not specified, it falls back to the + * 'default' context. + * + * **Schema** is a schema resource that represents a unique schema in a context + * of a schema registry instance. Each schema has a unique schema id, and can be + * referenced by a version of a subject. + * + * **Subject** refers to the name under which the schema is registered. A + * typical subject is the Kafka topic name. A schema registry instance can have + * multiple subjects. + * + * **Version** represents a version of a subject. A subject can have multiple + * versions. Creation of new version of a subject is guarded by the + * compatibility mode configured globally or for the subject specifically. + * + * **Config** represents a config at global level cross all registry + * instances or at subject level. Currently, only compatibility is supported in + * config. + * + * **Mode** represents the mode of a schema registry or a specific subject. + * Three modes are supported: + * * READONLY: The schema registry is in read-only mode, no write operations + * allowed.. + * * READWRITE: The schema registry is in read-write mode, which allows limited + * write operations on the schema. + * * IMPORT: The schema registry is in import mode, which allows more editing + * operations on the schema for data importing purposes. + * @class + * @memberof v1 + */ +export class ManagedSchemaRegistryClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('schemaregistry'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + managedSchemaRegistryStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ManagedSchemaRegistryClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new ManagedSchemaRegistryClient({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 ManagedSchemaRegistryClient; + 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 = 'managedkafka.' + 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; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // 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 = { + projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions/{version}' + ), + projectLocationSchemaRegistryConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config' + ), + projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/compatibility/subjects/{subject}/versions/{version}' + ), + projectLocationSchemaRegistryContextConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/config' + ), + projectLocationSchemaRegistryContextModePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode' + ), + projectLocationSchemaRegistryContextSchemasPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}' + ), + projectLocationSchemaRegistryContextSubjectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}' + ), + projectLocationSchemaRegistryContextSubjectVersionsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}' + ), + projectLocationSchemaRegistryContextSubjectsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}' + ), + projectLocationSchemaRegistryModePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode' + ), + projectLocationSchemaRegistrySchemasPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}' + ), + projectLocationSchemaRegistrySubjectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}' + ), + projectLocationSchemaRegistrySubjectVersionsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}' + ), + projectLocationSchemaRegistrySubjectsPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}' + ), + schemaContextPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}' + ), + schemaRegistryPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/schemaRegistries/{schema_registry}' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry', 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.managedSchemaRegistryStub) { + return this.managedSchemaRegistryStub; + } + + // Put together the "service stub" for + // google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry. + this.managedSchemaRegistryStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry, + 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 managedSchemaRegistryStubMethods = + ['getSchemaRegistry', 'listSchemaRegistries', 'createSchemaRegistry', 'deleteSchemaRegistry', 'getContext', 'listContexts', 'getSchema', 'getRawSchema', 'listSchemaVersions', 'listSchemaTypes', 'listSubjects', 'listSubjectsBySchemaId', 'deleteSubject', 'lookupVersion', 'getVersion', 'getRawSchemaVersion', 'listVersions', 'createVersion', 'deleteVersion', 'listReferencedSchemas', 'checkCompatibility', 'getSchemaConfig', 'updateSchemaConfig', 'deleteSchemaConfig', 'getSchemaMode', 'updateSchemaMode', 'deleteSchemaMode']; + for (const methodName of managedSchemaRegistryStubMethods) { + const callPromise = this.managedSchemaRegistryStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.managedSchemaRegistryStub; + } + + /** + * 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 'managedkafka.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 'managedkafka.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 -- + // ------------------- +/** + * Get the schema registry instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the schema registry instance to return. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaRegistry|SchemaRegistry}. + * 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/managed_schema_registry.get_schema_registry.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaRegistry_async + */ + getSchemaRegistry( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|undefined, {}|undefined + ]>; + getSchemaRegistry( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|null|undefined, + {}|null|undefined>): void; + getSchemaRegistry( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|null|undefined, + {}|null|undefined>): void; + getSchemaRegistry( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getSchemaRegistry request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSchemaRegistry response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getSchemaRegistry(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRegistryRequest|undefined, + {}|undefined + ]) => { + this._log.info('getSchemaRegistry response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * List schema registries. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent whose schema registry instances are to be listed. + * Structured like: `projects/{project}/locations/{location}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse|ListSchemaRegistriesResponse}. + * 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/managed_schema_registry.list_schema_registries.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaRegistries_async + */ + listSchemaRegistries( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|undefined, {}|undefined + ]>; + listSchemaRegistries( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|null|undefined, + {}|null|undefined>): void; + listSchemaRegistries( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|null|undefined, + {}|null|undefined>): void; + listSchemaRegistries( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listSchemaRegistries request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listSchemaRegistries response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listSchemaRegistries(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesRequest|undefined, + {}|undefined + ]) => { + this._log.info('listSchemaRegistries response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Create a schema registry instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent whose schema registry instance is to be created. + * Structured like: `projects/{project}/locations/{location}` + * @param {string} request.schemaRegistryId + * Required. The schema registry instance ID to use for this schema registry. + * The ID must contain only letters (a-z, A-Z), numbers (0-9), and underscores + * (-). The maximum length is 63 characters. + * The ID must not start with a number. + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry} request.schemaRegistry + * Required. The schema registry instance to create. + * The name field is ignored. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry|SchemaRegistry}. + * 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/managed_schema_registry.create_schema_registry.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_CreateSchemaRegistry_async + */ + createSchemaRegistry( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|undefined, {}|undefined + ]>; + createSchemaRegistry( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|null|undefined, + {}|null|undefined>): void; + createSchemaRegistry( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|null|undefined, + {}|null|undefined>): void; + createSchemaRegistry( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createSchemaRegistry request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createSchemaRegistry response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createSchemaRegistry(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateSchemaRegistryRequest|undefined, + {}|undefined + ]) => { + this._log.info('createSchemaRegistry response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Delete a schema registry instance. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the schema registry instance to delete. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_schema_registry.delete_schema_registry.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaRegistry_async + */ + deleteSchemaRegistry( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|undefined, {}|undefined + ]>; + deleteSchemaRegistry( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|null|undefined, + {}|null|undefined>): void; + deleteSchemaRegistry( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|null|undefined, + {}|null|undefined>): void; + deleteSchemaRegistry( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteSchemaRegistry request %j', request); + const wrappedCallback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteSchemaRegistry response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteSchemaRegistry(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaRegistryRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteSchemaRegistry response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get the context. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the context to return. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.Context|Context}. + * 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/managed_schema_registry.get_context.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetContext_async + */ + getContext( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|undefined, {}|undefined + ]>; + getContext( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|null|undefined, + {}|null|undefined>): void; + getContext( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|null|undefined, + {}|null|undefined>): void; + getContext( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getContext request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getContext response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getContext(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.IContext, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetContextRequest|undefined, + {}|undefined + ]) => { + this._log.info('getContext response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * List contexts for a schema registry. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent of the contexts. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.list_contexts.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListContexts_async + */ + listContexts( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|undefined, {}|undefined + ]>; + listContexts( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|null|undefined, + {}|null|undefined>): void; + listContexts( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|null|undefined, + {}|null|undefined>): void; + listContexts( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listContexts request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listContexts response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listContexts(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListContextsRequest|undefined, + {}|undefined + ]) => { + this._log.info('listContexts response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get the schema for the given schema id. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the schema to return. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * @param {string} [request.subject] + * Optional. Used to limit the search for the schema ID to a specific subject, + * otherwise the schema ID will be searched for in all subjects in the given + * specified context. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.Schema|Schema}. + * 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/managed_schema_registry.get_schema.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetSchema_async + */ + getSchema( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|undefined, {}|undefined + ]>; + getSchema( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>): void; + getSchema( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>): void; + getSchema( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getSchema request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSchema response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getSchema(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchema, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|undefined, + {}|undefined + ]) => { + this._log.info('getSchema response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get the schema string for the given schema id. + * The response will be the schema string. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the schema to return. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * @param {string} [request.subject] + * Optional. Used to limit the search for the schema ID to a specific subject, + * otherwise the schema ID will be searched for in all subjects in the given + * specified context. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.get_raw_schema.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchema_async + */ + getRawSchema( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|undefined, {}|undefined + ]>; + getRawSchema( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>): void; + getRawSchema( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>): void; + getRawSchema( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getRawSchema request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRawSchema response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRawSchema(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRawSchema response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * List the schema versions for the given schema id. + * The response will be an array of subject-version pairs as: + * [{"subject":"subject1", "version":1}, {"subject":"subject2", "version":2}]. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The schema whose schema versions are to be listed. Structured + * like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + * @param {string} [request.subject] + * Optional. The subject to filter the subjects by. + * @param {boolean} [request.deleted] + * Optional. If true, the response will include soft-deleted versions of the + * schema, even if the subject is soft-deleted. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.list_schema_versions.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaVersions_async + */ + listSchemaVersions( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|undefined, {}|undefined + ]>; + listSchemaVersions( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|null|undefined, + {}|null|undefined>): void; + listSchemaVersions( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|null|undefined, + {}|null|undefined>): void; + listSchemaVersions( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listSchemaVersions request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listSchemaVersions response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listSchemaVersions(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaVersionsRequest|undefined, + {}|undefined + ]) => { + this._log.info('listSchemaVersions response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * List the supported schema types. + * The response will be an array of schema types. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent schema registry whose schema types are to be listed. + * Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.list_schema_types.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListSchemaTypes_async + */ + listSchemaTypes( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|undefined, {}|undefined + ]>; + listSchemaTypes( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|null|undefined, + {}|null|undefined>): void; + listSchemaTypes( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|null|undefined, + {}|null|undefined>): void; + listSchemaTypes( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listSchemaTypes request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listSchemaTypes response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listSchemaTypes(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaTypesRequest|undefined, + {}|undefined + ]) => { + this._log.info('listSchemaTypes response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * List subjects in the schema registry. + * The response will be an array of subject names. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent schema registry/context whose subjects are to be + * listed. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}` + * @param {string} [request.subjectPrefix] + * Optional. The context to filter the subjects by, in the format of + * `:.{context}:`. If unset, all subjects in the registry are returned. Set to + * empty string or add as + * '?subjectPrefix=' at the end of this request to list subjects in the + * default context. + * @param {boolean} [request.deleted] + * Optional. If true, the response will include soft-deleted subjects. The + * default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.list_subjects.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjects_async + */ + listSubjects( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|undefined, {}|undefined + ]>; + listSubjects( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|null|undefined, + {}|null|undefined>): void; + listSubjects( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|null|undefined, + {}|null|undefined>): void; + listSubjects( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listSubjects request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listSubjects response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listSubjects(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsRequest|undefined, + {}|undefined + ]) => { + this._log.info('listSubjects response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * List subjects which reference a particular schema id. + * The response will be an array of subject names. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The schema resource whose associated subjects are to be listed. + * Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/schemas/ids/{schema}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/schemas/ids/{schema}` + * @param {string} [request.subject] + * Optional. The subject to filter the subjects by. + * @param {boolean} [request.deleted] + * Optional. If true, the response will include soft-deleted subjects. The + * default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.list_subjects_by_schema_id.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListSubjectsBySchemaId_async + */ + listSubjectsBySchemaId( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|undefined, {}|undefined + ]>; + listSubjectsBySchemaId( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|null|undefined, + {}|null|undefined>): void; + listSubjectsBySchemaId( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|null|undefined, + {}|null|undefined>): void; + listSubjectsBySchemaId( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listSubjectsBySchemaId request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listSubjectsBySchemaId response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listSubjectsBySchemaId(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListSubjectsBySchemaIdRequest|undefined, + {}|undefined + ]) => { + this._log.info('listSubjectsBySchemaId response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Delete a subject. + * The response will be an array of versions of the deleted subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the subject to delete. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + * @param {boolean} [request.permanent] + * Optional. If true, the subject and all associated metadata including the + * schema ID will be deleted permanently. Otherwise, only the subject is + * soft-deleted. The default is false. Soft-deleted subjects can still be + * searched in ListSubjects API call with deleted=true query parameter. A + * soft-delete of a subject must be performed before a hard-delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.delete_subject.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSubject_async + */ + deleteSubject( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|undefined, {}|undefined + ]>; + deleteSubject( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|null|undefined, + {}|null|undefined>): void; + deleteSubject( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|null|undefined, + {}|null|undefined>): void; + deleteSubject( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteSubject request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteSubject response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteSubject(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSubjectRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteSubject response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Lookup a schema under the specified subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The subject to lookup the schema in. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType} [request.schemaType] + * Optional. The schema type of the schema. + * @param {string} request.schema + * Required. The schema payload + * @param {number[]} [request.references] + * Optional. The schema references used by the schema. + * @param {boolean} [request.normalize] + * Optional. If true, the schema will be normalized before being looked up. + * The default is false. + * @param {boolean} [request.deleted] + * Optional. If true, soft-deleted versions will be included in lookup, no + * matter if the subject is active or soft-deleted. If false, soft-deleted + * versions will be excluded. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaVersion|SchemaVersion}. + * 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/managed_schema_registry.lookup_version.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_LookupVersion_async + */ + lookupVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|undefined, {}|undefined + ]>; + lookupVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|null|undefined, + {}|null|undefined>): void; + lookupVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|null|undefined, + {}|null|undefined>): void; + lookupVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('lookupVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('lookupVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.lookupVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.ILookupVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('lookupVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get a versioned schema (schema with subject/version) of a subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the subject to return versions. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + * @param {boolean} [request.deleted] + * Optional. If true, no matter if the subject/version is soft-deleted or not, + * it returns the version details. If false, it returns NOT_FOUND error if the + * subject/version is soft-deleted. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaVersion|SchemaVersion}. + * 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/managed_schema_registry.get_version.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetVersion_async + */ + getVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|undefined, {}|undefined + ]>; + getVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get the schema string only for a version of a subject. + * The response will be the schema string. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the subject to return versions. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + * @param {boolean} [request.deleted] + * Optional. If true, no matter if the subject/version is soft-deleted or not, + * it returns the version details. If false, it returns NOT_FOUND error if the + * subject/version is soft-deleted. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.get_raw_schema_version.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetRawSchemaVersion_async + */ + getRawSchemaVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|undefined, {}|undefined + ]>; + getRawSchemaVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getRawSchemaVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): void; + getRawSchemaVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getRawSchemaVersion request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getRawSchemaVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getRawSchemaVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('getRawSchemaVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get all versions of a subject. + * The response will be an array of versions of the subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The subject whose versions are to be listed. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + * @param {boolean} [request.deleted] + * Optional. If true, the response will include soft-deleted versions of an + * active or soft-deleted subject. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.list_versions.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListVersions_async + */ + listVersions( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|undefined, {}|undefined + ]>; + listVersions( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|null|undefined, + {}|null|undefined>): void; + listVersions( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|null|undefined, + {}|null|undefined>): void; + listVersions( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listVersions request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listVersions response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listVersions(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListVersionsRequest|undefined, + {}|undefined + ]) => { + this._log.info('listVersions response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Register a new version under a given subject with the given schema. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The subject to create the version for. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}` + * @param {number} [request.version] + * Optional. The version to create. It is optional. If not specified, the + * version will be created with the max version ID of the subject increased + * by 1. If the version ID is specified, it will be used as the new version ID + * and must not be used by an existing version of the subject. + * @param {number} [request.id] + * Optional. The schema ID of the schema. If not specified, the schema ID will + * be generated by the server. If the schema ID is specified, it must not be + * used by an existing schema that is different from the schema to be created. + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType} [request.schemaType] + * Optional. The type of the schema. It is optional. If not specified, the + * schema type will be AVRO. + * @param {string} request.schema + * Required. The schema payload + * @param {number[]} [request.references] + * Optional. The schema references used by the schema. + * @param {boolean} [request.normalize] + * Optional. If true, the schema will be normalized before being stored. The + * default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.CreateVersionResponse|CreateVersionResponse}. + * 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/managed_schema_registry.create_version.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_CreateVersion_async + */ + createVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|undefined, {}|undefined + ]>; + createVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|null|undefined, + {}|null|undefined>): void; + createVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|null|undefined, + {}|null|undefined>): void; + createVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('createVersion request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.createVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('createVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Delete a version of a subject. + * The response will be the deleted version id. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the subject version to delete. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + * @param {boolean} [request.permanent] + * Optional. If true, both the version and the referenced schema ID will be + * permanently deleted. The default is false. If false, the version will be + * deleted but the schema ID will be retained. Soft-deleted versions can still + * be searched in ListVersions API call with deleted=true query parameter. A + * soft-delete of a version must be performed before a hard-delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.delete_version.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_DeleteVersion_async + */ + deleteVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|undefined, {}|undefined + ]>; + deleteVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|null|undefined, + {}|null|undefined>): void; + deleteVersion( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|null|undefined, + {}|null|undefined>): void; + deleteVersion( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteVersion request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteVersion response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteVersion(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteVersionRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteVersion response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get a list of IDs of schemas that reference the schema with the given + * subject and version. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The version to list referenced by. Structured like: + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/subjects/{subject}/versions/{version}` + * or + * `projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/subjects/{subject}/versions/{version}` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.api.HttpBody|HttpBody}. + * 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/managed_schema_registry.list_referenced_schemas.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_ListReferencedSchemas_async + */ + listReferencedSchemas( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest, + options?: CallOptions): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|undefined, {}|undefined + ]>; + listReferencedSchemas( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest, + options: CallOptions, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|null|undefined, + {}|null|undefined>): void; + listReferencedSchemas( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest, + callback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|null|undefined, + {}|null|undefined>): void; + listReferencedSchemas( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('listReferencedSchemas request %j', request); + const wrappedCallback: Callback< + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listReferencedSchemas response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.listReferencedSchemas(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.api.IHttpBody, + protos.google.cloud.managedkafka.schemaregistry.v1.IListReferencedSchemasRequest|undefined, + {}|undefined + ]) => { + this._log.info('listReferencedSchemas response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Check compatibility of a schema with all versions or a specific version of + * a subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the resource to check compatibility for. The format + * is either of following: + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/* /versions: Check compatibility with one or + * more versions of the specified subject. + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/compatibility/subjects/{subject}/versions/{version}: Check + * compatibility with a specific version of the subject. + * @param {google.cloud.managedkafka.schemaregistry.v1.Schema.SchemaType} [request.schemaType] + * Optional. The schema type of the schema. + * @param {string} request.schema + * Required. The schema payload + * @param {number[]} [request.references] + * Optional. The schema references used by the schema. + * @param {boolean} [request.verbose] + * Optional. If true, the response will contain the compatibility check result + * with reasons for failed checks. The default is false. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.CheckCompatibilityResponse|CheckCompatibilityResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/managed_schema_registry.check_compatibility.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_CheckCompatibility_async + */ + checkCompatibility( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|undefined, {}|undefined + ]>; + checkCompatibility( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request: protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): void; + checkCompatibility( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('checkCompatibility request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('checkCompatibility response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.checkCompatibility(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse, + protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityRequest|undefined, + {}|undefined + ]) => { + this._log.info('checkCompatibility response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get schema config at global level or for a subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name to get the config for. It can be either of + * following: + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config: Get config at global level. + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}: Get config for a specific subject. + * @param {boolean} [request.defaultToGlobal] + * Optional. If true, the config will fall back to the config at the global + * level if no subject level config is found. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaConfig|SchemaConfig}. + * 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/managed_schema_registry.get_schema_config.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaConfig_async + */ + getSchemaConfig( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|undefined, {}|undefined + ]>; + getSchemaConfig( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|null|undefined, + {}|null|undefined>): void; + getSchemaConfig( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|null|undefined, + {}|null|undefined>): void; + getSchemaConfig( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getSchemaConfig request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSchemaConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getSchemaConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('getSchemaConfig response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Update config at global level or for a subject. + * Creates a SchemaSubject-level SchemaConfig if it does not exist. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name to update the config for. It can be either of + * following: + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config: Update config at global level. + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject}: Update config for a specific subject. + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaConfig.CompatibilityType} request.compatibility + * Required. The compatibility type of the schemas. + * Cannot be unset for a SchemaRegistry-level SchemaConfig. + * If unset on a SchemaSubject-level SchemaConfig, removes the compatibility + * field for the SchemaConfig. + * @param {boolean} [request.normalize] + * Optional. If true, the schema will be normalized before being stored or + * looked up. The default is false. Cannot be unset for a SchemaRegistry-level + * SchemaConfig. If unset on a SchemaSubject-level SchemaConfig, removes the + * normalize field for the SchemaConfig. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaConfig|SchemaConfig}. + * 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/managed_schema_registry.update_schema_config.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaConfig_async + */ + updateSchemaConfig( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|undefined, {}|undefined + ]>; + updateSchemaConfig( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|null|undefined, + {}|null|undefined>): void; + updateSchemaConfig( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|null|undefined, + {}|null|undefined>): void; + updateSchemaConfig( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateSchemaConfig request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateSchemaConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateSchemaConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateSchemaConfig response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Delete schema config for a subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of subject to delete the config for. The format + * is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/config/{subject} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaConfig|SchemaConfig}. + * 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/managed_schema_registry.delete_schema_config.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaConfig_async + */ + deleteSchemaConfig( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|undefined, {}|undefined + ]>; + deleteSchemaConfig( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|null|undefined, + {}|null|undefined>): void; + deleteSchemaConfig( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|null|undefined, + {}|null|undefined>): void; + deleteSchemaConfig( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteSchemaConfig request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteSchemaConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteSchemaConfig(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaConfigRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteSchemaConfig response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Get mode at global level or for a subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the mode. The format is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaMode|SchemaMode}. + * 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/managed_schema_registry.get_schema_mode.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_GetSchemaMode_async + */ + getSchemaMode( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|undefined, {}|undefined + ]>; + getSchemaMode( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|null|undefined, + {}|null|undefined>): void; + getSchemaMode( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|null|undefined, + {}|null|undefined>): void; + getSchemaMode( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getSchemaMode request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getSchemaMode response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getSchemaMode(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IGetSchemaModeRequest|undefined, + {}|undefined + ]) => { + this._log.info('getSchemaMode response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Update mode at global level or for a subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the mode. The format is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject}: mode for a schema registry, or + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject}: mode for a specific subject in a specific context + * @param {google.cloud.managedkafka.schemaregistry.v1.SchemaMode.ModeType} request.mode + * Required. The mode type. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaMode|SchemaMode}. + * 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/managed_schema_registry.update_schema_mode.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_UpdateSchemaMode_async + */ + updateSchemaMode( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|undefined, {}|undefined + ]>; + updateSchemaMode( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|null|undefined, + {}|null|undefined>): void; + updateSchemaMode( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|null|undefined, + {}|null|undefined>): void; + updateSchemaMode( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('updateSchemaMode request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateSchemaMode response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.updateSchemaMode(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IUpdateSchemaModeRequest|undefined, + {}|undefined + ]) => { + this._log.info('updateSchemaMode response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Delete schema mode for a subject. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of subject to delete the mode for. The format + * is + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/mode/{subject} + * * projects/{project}/locations/{location}/schemaRegistries/{schema_registry}/contexts/{context}/mode/{subject} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.managedkafka.schemaregistry.v1.SchemaMode|SchemaMode}. + * 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/managed_schema_registry.delete_schema_mode.js + * region_tag:managedkafka_v1_generated_ManagedSchemaRegistry_DeleteSchemaMode_async + */ + deleteSchemaMode( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|undefined, {}|undefined + ]>; + deleteSchemaMode( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|null|undefined, + {}|null|undefined>): void; + deleteSchemaMode( + request: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest, + callback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|null|undefined, + {}|null|undefined>): void; + deleteSchemaMode( + request?: protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('deleteSchemaMode request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteSchemaMode response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.deleteSchemaMode(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode, + protos.google.cloud.managedkafka.schemaregistry.v1.IDeleteSchemaModeRequest|undefined, + {}|undefined + ]) => { + this._log.info('deleteSchemaMode response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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 google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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 google.cloud.location.Location | Location}. 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 + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified projectLocationSchemaRegistryCompatibilitySubjectVersions resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} subject + * @param {string} version + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryCompatibilitySubjectVersionsPath(project:string,location:string,schemaRegistry:string,subject:string,version:string) { + return this.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + subject: subject, + version: version, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_compatibility_subject_versions resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(projectLocationSchemaRegistryCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryCompatibilitySubjectVersionsName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_compatibility_subject_versions resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(projectLocationSchemaRegistryCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryCompatibilitySubjectVersionsName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_compatibility_subject_versions resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(projectLocationSchemaRegistryCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryCompatibilitySubjectVersionsName).schema_registry; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistryCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_compatibility_subject_versions resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(projectLocationSchemaRegistryCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryCompatibilitySubjectVersionsName).subject; + } + + /** + * Parse the version from ProjectLocationSchemaRegistryCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_compatibility_subject_versions resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(projectLocationSchemaRegistryCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryCompatibilitySubjectVersionsName).version; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryConfigPath(project:string,location:string,schemaRegistry:string) { + return this.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryConfig resource. + * + * @param {string} projectLocationSchemaRegistryConfigName + * A fully-qualified path representing project_location_schema_registry_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryConfigName(projectLocationSchemaRegistryConfigName: string) { + return this.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.match(projectLocationSchemaRegistryConfigName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryConfig resource. + * + * @param {string} projectLocationSchemaRegistryConfigName + * A fully-qualified path representing project_location_schema_registry_config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryConfigName(projectLocationSchemaRegistryConfigName: string) { + return this.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.match(projectLocationSchemaRegistryConfigName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryConfig resource. + * + * @param {string} projectLocationSchemaRegistryConfigName + * A fully-qualified path representing project_location_schema_registry_config resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryConfigName(projectLocationSchemaRegistryConfigName: string) { + return this.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.match(projectLocationSchemaRegistryConfigName).schema_registry; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryContextCompatibilitySubjectVersions resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @param {string} subject + * @param {string} version + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPath(project:string,location:string,schemaRegistry:string,context:string,subject:string,version:string) { + return this.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + subject: subject, + version: version, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryContextCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_compatibility_subject_versions resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryContextCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_compatibility_subject_versions resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryContextCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_compatibility_subject_versions resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName).schema_registry; + } + + /** + * Parse the context from ProjectLocationSchemaRegistryContextCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_compatibility_subject_versions resource. + * @returns {string} A string representing the context. + */ + matchContextFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName).context; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistryContextCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_compatibility_subject_versions resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName).subject; + } + + /** + * Parse the version from ProjectLocationSchemaRegistryContextCompatibilitySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_compatibility_subject_versions resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextCompatibilitySubjectVersionsName).version; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryContextConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryContextConfigPath(project:string,location:string,schemaRegistry:string,context:string) { + return this.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryContextConfig resource. + * + * @param {string} projectLocationSchemaRegistryContextConfigName + * A fully-qualified path representing project_location_schema_registry_context_config resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryContextConfigName(projectLocationSchemaRegistryContextConfigName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match(projectLocationSchemaRegistryContextConfigName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryContextConfig resource. + * + * @param {string} projectLocationSchemaRegistryContextConfigName + * A fully-qualified path representing project_location_schema_registry_context_config resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryContextConfigName(projectLocationSchemaRegistryContextConfigName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match(projectLocationSchemaRegistryContextConfigName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryContextConfig resource. + * + * @param {string} projectLocationSchemaRegistryContextConfigName + * A fully-qualified path representing project_location_schema_registry_context_config resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryContextConfigName(projectLocationSchemaRegistryContextConfigName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match(projectLocationSchemaRegistryContextConfigName).schema_registry; + } + + /** + * Parse the context from ProjectLocationSchemaRegistryContextConfig resource. + * + * @param {string} projectLocationSchemaRegistryContextConfigName + * A fully-qualified path representing project_location_schema_registry_context_config resource. + * @returns {string} A string representing the context. + */ + matchContextFromProjectLocationSchemaRegistryContextConfigName(projectLocationSchemaRegistryContextConfigName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match(projectLocationSchemaRegistryContextConfigName).context; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryContextMode resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryContextModePath(project:string,location:string,schemaRegistry:string,context:string) { + return this.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryContextMode resource. + * + * @param {string} projectLocationSchemaRegistryContextModeName + * A fully-qualified path representing project_location_schema_registry_context_mode resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryContextModeName(projectLocationSchemaRegistryContextModeName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match(projectLocationSchemaRegistryContextModeName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryContextMode resource. + * + * @param {string} projectLocationSchemaRegistryContextModeName + * A fully-qualified path representing project_location_schema_registry_context_mode resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryContextModeName(projectLocationSchemaRegistryContextModeName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match(projectLocationSchemaRegistryContextModeName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryContextMode resource. + * + * @param {string} projectLocationSchemaRegistryContextModeName + * A fully-qualified path representing project_location_schema_registry_context_mode resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryContextModeName(projectLocationSchemaRegistryContextModeName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match(projectLocationSchemaRegistryContextModeName).schema_registry; + } + + /** + * Parse the context from ProjectLocationSchemaRegistryContextMode resource. + * + * @param {string} projectLocationSchemaRegistryContextModeName + * A fully-qualified path representing project_location_schema_registry_context_mode resource. + * @returns {string} A string representing the context. + */ + matchContextFromProjectLocationSchemaRegistryContextModeName(projectLocationSchemaRegistryContextModeName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match(projectLocationSchemaRegistryContextModeName).context; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryContextSchemas resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryContextSchemasPath(project:string,location:string,schemaRegistry:string,context:string,schema:string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + schema: schema, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryContextSchemas resource. + * + * @param {string} projectLocationSchemaRegistryContextSchemasName + * A fully-qualified path representing project_location_schema_registry_context_schemas resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryContextSchemasName(projectLocationSchemaRegistryContextSchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match(projectLocationSchemaRegistryContextSchemasName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryContextSchemas resource. + * + * @param {string} projectLocationSchemaRegistryContextSchemasName + * A fully-qualified path representing project_location_schema_registry_context_schemas resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryContextSchemasName(projectLocationSchemaRegistryContextSchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match(projectLocationSchemaRegistryContextSchemasName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryContextSchemas resource. + * + * @param {string} projectLocationSchemaRegistryContextSchemasName + * A fully-qualified path representing project_location_schema_registry_context_schemas resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryContextSchemasName(projectLocationSchemaRegistryContextSchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match(projectLocationSchemaRegistryContextSchemasName).schema_registry; + } + + /** + * Parse the context from ProjectLocationSchemaRegistryContextSchemas resource. + * + * @param {string} projectLocationSchemaRegistryContextSchemasName + * A fully-qualified path representing project_location_schema_registry_context_schemas resource. + * @returns {string} A string representing the context. + */ + matchContextFromProjectLocationSchemaRegistryContextSchemasName(projectLocationSchemaRegistryContextSchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match(projectLocationSchemaRegistryContextSchemasName).context; + } + + /** + * Parse the schema from ProjectLocationSchemaRegistryContextSchemas resource. + * + * @param {string} projectLocationSchemaRegistryContextSchemasName + * A fully-qualified path representing project_location_schema_registry_context_schemas resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationSchemaRegistryContextSchemasName(projectLocationSchemaRegistryContextSchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match(projectLocationSchemaRegistryContextSchemasName).schema; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryContextSubject resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @param {string} subject + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryContextSubjectPath(project:string,location:string,schemaRegistry:string,context:string,subject:string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + subject: subject, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryContextSubject resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectName + * A fully-qualified path representing project_location_schema_registry_context_subject resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryContextSubjectName(projectLocationSchemaRegistryContextSubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match(projectLocationSchemaRegistryContextSubjectName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryContextSubject resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectName + * A fully-qualified path representing project_location_schema_registry_context_subject resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryContextSubjectName(projectLocationSchemaRegistryContextSubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match(projectLocationSchemaRegistryContextSubjectName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryContextSubject resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectName + * A fully-qualified path representing project_location_schema_registry_context_subject resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectName(projectLocationSchemaRegistryContextSubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match(projectLocationSchemaRegistryContextSubjectName).schema_registry; + } + + /** + * Parse the context from ProjectLocationSchemaRegistryContextSubject resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectName + * A fully-qualified path representing project_location_schema_registry_context_subject resource. + * @returns {string} A string representing the context. + */ + matchContextFromProjectLocationSchemaRegistryContextSubjectName(projectLocationSchemaRegistryContextSubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match(projectLocationSchemaRegistryContextSubjectName).context; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistryContextSubject resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectName + * A fully-qualified path representing project_location_schema_registry_context_subject resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistryContextSubjectName(projectLocationSchemaRegistryContextSubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match(projectLocationSchemaRegistryContextSubjectName).subject; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryContextSubjectVersions resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @param {string} subject + * @param {string} version + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryContextSubjectVersionsPath(project:string,location:string,schemaRegistry:string,context:string,subject:string,version:string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + subject: subject, + version: version, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryContextSubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_subject_versions resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryContextSubjectVersionsName(projectLocationSchemaRegistryContextSubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextSubjectVersionsName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryContextSubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_subject_versions resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryContextSubjectVersionsName(projectLocationSchemaRegistryContextSubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextSubjectVersionsName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryContextSubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_subject_versions resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectVersionsName(projectLocationSchemaRegistryContextSubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextSubjectVersionsName).schema_registry; + } + + /** + * Parse the context from ProjectLocationSchemaRegistryContextSubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_subject_versions resource. + * @returns {string} A string representing the context. + */ + matchContextFromProjectLocationSchemaRegistryContextSubjectVersionsName(projectLocationSchemaRegistryContextSubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextSubjectVersionsName).context; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistryContextSubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_subject_versions resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistryContextSubjectVersionsName(projectLocationSchemaRegistryContextSubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextSubjectVersionsName).subject; + } + + /** + * Parse the version from ProjectLocationSchemaRegistryContextSubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_context_subject_versions resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationSchemaRegistryContextSubjectVersionsName(projectLocationSchemaRegistryContextSubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match(projectLocationSchemaRegistryContextSubjectVersionsName).version; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryContextSubjects resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @param {string} subject + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryContextSubjectsPath(project:string,location:string,schemaRegistry:string,context:string,subject:string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + subject: subject, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryContextSubjects resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectsName + * A fully-qualified path representing project_location_schema_registry_context_subjects resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryContextSubjectsName(projectLocationSchemaRegistryContextSubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match(projectLocationSchemaRegistryContextSubjectsName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryContextSubjects resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectsName + * A fully-qualified path representing project_location_schema_registry_context_subjects resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryContextSubjectsName(projectLocationSchemaRegistryContextSubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match(projectLocationSchemaRegistryContextSubjectsName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryContextSubjects resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectsName + * A fully-qualified path representing project_location_schema_registry_context_subjects resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectsName(projectLocationSchemaRegistryContextSubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match(projectLocationSchemaRegistryContextSubjectsName).schema_registry; + } + + /** + * Parse the context from ProjectLocationSchemaRegistryContextSubjects resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectsName + * A fully-qualified path representing project_location_schema_registry_context_subjects resource. + * @returns {string} A string representing the context. + */ + matchContextFromProjectLocationSchemaRegistryContextSubjectsName(projectLocationSchemaRegistryContextSubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match(projectLocationSchemaRegistryContextSubjectsName).context; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistryContextSubjects resource. + * + * @param {string} projectLocationSchemaRegistryContextSubjectsName + * A fully-qualified path representing project_location_schema_registry_context_subjects resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistryContextSubjectsName(projectLocationSchemaRegistryContextSubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match(projectLocationSchemaRegistryContextSubjectsName).subject; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistryMode resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistryModePath(project:string,location:string,schemaRegistry:string) { + return this.pathTemplates.projectLocationSchemaRegistryModePathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistryMode resource. + * + * @param {string} projectLocationSchemaRegistryModeName + * A fully-qualified path representing project_location_schema_registry_mode resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistryModeName(projectLocationSchemaRegistryModeName: string) { + return this.pathTemplates.projectLocationSchemaRegistryModePathTemplate.match(projectLocationSchemaRegistryModeName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistryMode resource. + * + * @param {string} projectLocationSchemaRegistryModeName + * A fully-qualified path representing project_location_schema_registry_mode resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistryModeName(projectLocationSchemaRegistryModeName: string) { + return this.pathTemplates.projectLocationSchemaRegistryModePathTemplate.match(projectLocationSchemaRegistryModeName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistryMode resource. + * + * @param {string} projectLocationSchemaRegistryModeName + * A fully-qualified path representing project_location_schema_registry_mode resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistryModeName(projectLocationSchemaRegistryModeName: string) { + return this.pathTemplates.projectLocationSchemaRegistryModePathTemplate.match(projectLocationSchemaRegistryModeName).schema_registry; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistrySchemas resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} schema + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistrySchemasPath(project:string,location:string,schemaRegistry:string,schema:string) { + return this.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + schema: schema, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistrySchemas resource. + * + * @param {string} projectLocationSchemaRegistrySchemasName + * A fully-qualified path representing project_location_schema_registry_schemas resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistrySchemasName(projectLocationSchemaRegistrySchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match(projectLocationSchemaRegistrySchemasName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistrySchemas resource. + * + * @param {string} projectLocationSchemaRegistrySchemasName + * A fully-qualified path representing project_location_schema_registry_schemas resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistrySchemasName(projectLocationSchemaRegistrySchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match(projectLocationSchemaRegistrySchemasName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistrySchemas resource. + * + * @param {string} projectLocationSchemaRegistrySchemasName + * A fully-qualified path representing project_location_schema_registry_schemas resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistrySchemasName(projectLocationSchemaRegistrySchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match(projectLocationSchemaRegistrySchemasName).schema_registry; + } + + /** + * Parse the schema from ProjectLocationSchemaRegistrySchemas resource. + * + * @param {string} projectLocationSchemaRegistrySchemasName + * A fully-qualified path representing project_location_schema_registry_schemas resource. + * @returns {string} A string representing the schema. + */ + matchSchemaFromProjectLocationSchemaRegistrySchemasName(projectLocationSchemaRegistrySchemasName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match(projectLocationSchemaRegistrySchemasName).schema; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistrySubject resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} subject + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistrySubjectPath(project:string,location:string,schemaRegistry:string,subject:string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + subject: subject, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistrySubject resource. + * + * @param {string} projectLocationSchemaRegistrySubjectName + * A fully-qualified path representing project_location_schema_registry_subject resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistrySubjectName(projectLocationSchemaRegistrySubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match(projectLocationSchemaRegistrySubjectName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistrySubject resource. + * + * @param {string} projectLocationSchemaRegistrySubjectName + * A fully-qualified path representing project_location_schema_registry_subject resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistrySubjectName(projectLocationSchemaRegistrySubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match(projectLocationSchemaRegistrySubjectName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistrySubject resource. + * + * @param {string} projectLocationSchemaRegistrySubjectName + * A fully-qualified path representing project_location_schema_registry_subject resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectName(projectLocationSchemaRegistrySubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match(projectLocationSchemaRegistrySubjectName).schema_registry; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistrySubject resource. + * + * @param {string} projectLocationSchemaRegistrySubjectName + * A fully-qualified path representing project_location_schema_registry_subject resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistrySubjectName(projectLocationSchemaRegistrySubjectName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match(projectLocationSchemaRegistrySubjectName).subject; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistrySubjectVersions resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} subject + * @param {string} version + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistrySubjectVersionsPath(project:string,location:string,schemaRegistry:string,subject:string,version:string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + subject: subject, + version: version, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistrySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistrySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_subject_versions resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistrySubjectVersionsName(projectLocationSchemaRegistrySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match(projectLocationSchemaRegistrySubjectVersionsName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistrySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistrySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_subject_versions resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistrySubjectVersionsName(projectLocationSchemaRegistrySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match(projectLocationSchemaRegistrySubjectVersionsName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistrySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistrySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_subject_versions resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectVersionsName(projectLocationSchemaRegistrySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match(projectLocationSchemaRegistrySubjectVersionsName).schema_registry; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistrySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistrySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_subject_versions resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistrySubjectVersionsName(projectLocationSchemaRegistrySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match(projectLocationSchemaRegistrySubjectVersionsName).subject; + } + + /** + * Parse the version from ProjectLocationSchemaRegistrySubjectVersions resource. + * + * @param {string} projectLocationSchemaRegistrySubjectVersionsName + * A fully-qualified path representing project_location_schema_registry_subject_versions resource. + * @returns {string} A string representing the version. + */ + matchVersionFromProjectLocationSchemaRegistrySubjectVersionsName(projectLocationSchemaRegistrySubjectVersionsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match(projectLocationSchemaRegistrySubjectVersionsName).version; + } + + /** + * Return a fully-qualified projectLocationSchemaRegistrySubjects resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} subject + * @returns {string} Resource name string. + */ + projectLocationSchemaRegistrySubjectsPath(project:string,location:string,schemaRegistry:string,subject:string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + subject: subject, + }); + } + + /** + * Parse the project from ProjectLocationSchemaRegistrySubjects resource. + * + * @param {string} projectLocationSchemaRegistrySubjectsName + * A fully-qualified path representing project_location_schema_registry_subjects resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationSchemaRegistrySubjectsName(projectLocationSchemaRegistrySubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match(projectLocationSchemaRegistrySubjectsName).project; + } + + /** + * Parse the location from ProjectLocationSchemaRegistrySubjects resource. + * + * @param {string} projectLocationSchemaRegistrySubjectsName + * A fully-qualified path representing project_location_schema_registry_subjects resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationSchemaRegistrySubjectsName(projectLocationSchemaRegistrySubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match(projectLocationSchemaRegistrySubjectsName).location; + } + + /** + * Parse the schema_registry from ProjectLocationSchemaRegistrySubjects resource. + * + * @param {string} projectLocationSchemaRegistrySubjectsName + * A fully-qualified path representing project_location_schema_registry_subjects resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectsName(projectLocationSchemaRegistrySubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match(projectLocationSchemaRegistrySubjectsName).schema_registry; + } + + /** + * Parse the subject from ProjectLocationSchemaRegistrySubjects resource. + * + * @param {string} projectLocationSchemaRegistrySubjectsName + * A fully-qualified path representing project_location_schema_registry_subjects resource. + * @returns {string} A string representing the subject. + */ + matchSubjectFromProjectLocationSchemaRegistrySubjectsName(projectLocationSchemaRegistrySubjectsName: string) { + return this.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match(projectLocationSchemaRegistrySubjectsName).subject; + } + + /** + * Return a fully-qualified schemaContext resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @param {string} context + * @returns {string} Resource name string. + */ + schemaContextPath(project:string,location:string,schemaRegistry:string,context:string) { + return this.pathTemplates.schemaContextPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + context: context, + }); + } + + /** + * Parse the project from SchemaContext resource. + * + * @param {string} schemaContextName + * A fully-qualified path representing SchemaContext resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSchemaContextName(schemaContextName: string) { + return this.pathTemplates.schemaContextPathTemplate.match(schemaContextName).project; + } + + /** + * Parse the location from SchemaContext resource. + * + * @param {string} schemaContextName + * A fully-qualified path representing SchemaContext resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSchemaContextName(schemaContextName: string) { + return this.pathTemplates.schemaContextPathTemplate.match(schemaContextName).location; + } + + /** + * Parse the schema_registry from SchemaContext resource. + * + * @param {string} schemaContextName + * A fully-qualified path representing SchemaContext resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromSchemaContextName(schemaContextName: string) { + return this.pathTemplates.schemaContextPathTemplate.match(schemaContextName).schema_registry; + } + + /** + * Parse the context from SchemaContext resource. + * + * @param {string} schemaContextName + * A fully-qualified path representing SchemaContext resource. + * @returns {string} A string representing the context. + */ + matchContextFromSchemaContextName(schemaContextName: string) { + return this.pathTemplates.schemaContextPathTemplate.match(schemaContextName).context; + } + + /** + * Return a fully-qualified schemaRegistry resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} schema_registry + * @returns {string} Resource name string. + */ + schemaRegistryPath(project:string,location:string,schemaRegistry:string) { + return this.pathTemplates.schemaRegistryPathTemplate.render({ + project: project, + location: location, + schema_registry: schemaRegistry, + }); + } + + /** + * Parse the project from SchemaRegistry resource. + * + * @param {string} schemaRegistryName + * A fully-qualified path representing SchemaRegistry resource. + * @returns {string} A string representing the project. + */ + matchProjectFromSchemaRegistryName(schemaRegistryName: string) { + return this.pathTemplates.schemaRegistryPathTemplate.match(schemaRegistryName).project; + } + + /** + * Parse the location from SchemaRegistry resource. + * + * @param {string} schemaRegistryName + * A fully-qualified path representing SchemaRegistry resource. + * @returns {string} A string representing the location. + */ + matchLocationFromSchemaRegistryName(schemaRegistryName: string) { + return this.pathTemplates.schemaRegistryPathTemplate.match(schemaRegistryName).location; + } + + /** + * Parse the schema_registry from SchemaRegistry resource. + * + * @param {string} schemaRegistryName + * A fully-qualified path representing SchemaRegistry resource. + * @returns {string} A string representing the schema_registry. + */ + matchSchemaRegistryFromSchemaRegistryName(schemaRegistryName: string) { + return this.pathTemplates.schemaRegistryPathTemplate.match(schemaRegistryName).schema_registry; + } + + /** + * 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.managedSchemaRegistryStub && !this._terminated) { + return this.managedSchemaRegistryStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch(err => {throw err}); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_client_config.json b/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_client_config.json new file mode 100644 index 000000000000..6ea7422d37c8 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_client_config.json @@ -0,0 +1,134 @@ +{ + "interfaces": { + "google.cloud.managedkafka.schemaregistry.v1.ManagedSchemaRegistry": { + "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": { + "GetSchemaRegistry": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSchemaRegistries": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateSchemaRegistry": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSchemaRegistry": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetContext": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListContexts": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetSchema": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRawSchema": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSchemaVersions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSchemaTypes": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSubjects": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListSubjectsBySchemaId": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSubject": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "LookupVersion": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetVersion": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetRawSchemaVersion": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListVersions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateVersion": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteVersion": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListReferencedSchemas": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckCompatibility": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetSchemaConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSchemaConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSchemaConfig": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetSchemaMode": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateSchemaMode": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteSchemaMode": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_proto_list.json b/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_proto_list.json new file mode 100644 index 000000000000..e2a9d9bf1564 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/src/v1/managed_schema_registry_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry.proto", + "../../protos/google/cloud/managedkafka/schemaregistry/v1/schema_registry_resources.proto" +] diff --git a/packages/google-cloud-managedkafka-schemaregistry/system-test/fixtures/sample/src/index.js b/packages/google-cloud-managedkafka-schemaregistry/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..a72ab601f637 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const schemaregistry = require('@google-cloud/managedkafka-schemaregistry'); + +function main() { + const managedSchemaRegistryClient = new schemaregistry.ManagedSchemaRegistryClient(); +} + +main(); diff --git a/packages/google-cloud-managedkafka-schemaregistry/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-managedkafka-schemaregistry/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..a594fd782d61 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {ManagedSchemaRegistryClient} from '@google-cloud/managedkafka-schemaregistry'; + +// check that the client class type name can be used +function doStuffWithManagedSchemaRegistryClient(client: ManagedSchemaRegistryClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const managedSchemaRegistryClient = new ManagedSchemaRegistryClient(); + doStuffWithManagedSchemaRegistryClient(managedSchemaRegistryClient); +} + +main(); diff --git a/packages/google-cloud-managedkafka-schemaregistry/system-test/install.ts b/packages/google-cloud-managedkafka-schemaregistry/system-test/install.ts new file mode 100644 index 000000000000..2a505d6df0c5 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + + it('TypeScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync('./system-test/fixtures/sample/src/index.ts').toString() + } + }; + await packNTest(options); + }); + + it('JavaScript code', async function() { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync('./system-test/fixtures/sample/src/index.js').toString() + } + }; + await packNTest(options); + }); + +}); diff --git a/packages/google-cloud-managedkafka-schemaregistry/test/gapic_managed_schema_registry_v1.ts b/packages/google-cloud-managedkafka-schemaregistry/test/gapic_managed_schema_registry_v1.ts new file mode 100644 index 000000000000..e96ccbe8fdca --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/test/gapic_managed_schema_registry_v1.ts @@ -0,0 +1,4231 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 managedschemaregistryModule from '../src'; + +import {protobuf, LocationProtos} 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 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.ManagedSchemaRegistryClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'managedkafka.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient(); + 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 = managedschemaregistryModule.v1.ManagedSchemaRegistryClient.servicePath; + assert.strictEqual(servicePath, 'managedkafka.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = managedschemaregistryModule.v1.ManagedSchemaRegistryClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'managedkafka.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'managedkafka.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'managedkafka.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 managedschemaregistryModule.v1.ManagedSchemaRegistryClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'managedkafka.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 managedschemaregistryModule.v1.ManagedSchemaRegistryClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'managedkafka.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 managedschemaregistryModule.v1.ManagedSchemaRegistryClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = managedschemaregistryModule.v1.ManagedSchemaRegistryClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.managedSchemaRegistryStub, undefined); + await client.initialize(); + assert(client.managedSchemaRegistryStub); + }); + + it('has close method for the initialized client', done => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.managedSchemaRegistryStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.managedSchemaRegistryStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + 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 managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + 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('getSchemaRegistry', () => { + it('invokes getSchemaRegistry without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry() + ); + client.innerApiCalls.getSchemaRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.getSchemaRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaRegistry without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry() + ); + client.innerApiCalls.getSchemaRegistry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSchemaRegistry( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaRegistry with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSchemaRegistry = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSchemaRegistry(request), expectedError); + const actualRequest = (client.innerApiCalls.getSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaRegistry with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getSchemaRegistry(request), expectedError); + }); + }); + + describe('listSchemaRegistries', () => { + it('invokes listSchemaRegistries without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse() + ); + client.innerApiCalls.listSchemaRegistries = stubSimpleCall(expectedResponse); + const [response] = await client.listSchemaRegistries(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSchemaRegistries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaRegistries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaRegistries without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesResponse() + ); + client.innerApiCalls.listSchemaRegistries = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSchemaRegistries( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.IListSchemaRegistriesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSchemaRegistries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaRegistries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaRegistries with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSchemaRegistries = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSchemaRegistries(request), expectedError); + const actualRequest = (client.innerApiCalls.listSchemaRegistries as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaRegistries as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaRegistries with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaRegistriesRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listSchemaRegistries(request), expectedError); + }); + }); + + describe('createSchemaRegistry', () => { + it('invokes createSchemaRegistry without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry() + ); + client.innerApiCalls.createSchemaRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.createSchemaRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchemaRegistry without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaRegistry() + ); + client.innerApiCalls.createSchemaRegistry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createSchemaRegistry( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaRegistry|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchemaRegistry with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createSchemaRegistry = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createSchemaRegistry(request), expectedError); + const actualRequest = (client.innerApiCalls.createSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createSchemaRegistry with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateSchemaRegistryRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createSchemaRegistry(request), expectedError); + }); + }); + + describe('deleteSchemaRegistry', () => { + it('invokes deleteSchemaRegistry without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSchemaRegistry = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSchemaRegistry(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaRegistry without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteSchemaRegistry = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSchemaRegistry( + 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.deleteSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaRegistry with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSchemaRegistry = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteSchemaRegistry(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteSchemaRegistry as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaRegistry as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaRegistry with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaRegistryRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteSchemaRegistry(request), expectedError); + }); + }); + + describe('getContext', () => { + it('invokes getContext without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.Context() + ); + client.innerApiCalls.getContext = stubSimpleCall(expectedResponse); + const [response] = await client.getContext(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContext as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContext as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContext without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.Context() + ); + client.innerApiCalls.getContext = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getContext( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.IContext|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getContext as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContext as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContext with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getContext = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getContext(request), expectedError); + const actualRequest = (client.innerApiCalls.getContext as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getContext as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getContext with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetContextRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getContext(request), expectedError); + }); + }); + + describe('listContexts', () => { + it('invokes listContexts without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listContexts = stubSimpleCall(expectedResponse); + const [response] = await client.listContexts(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContexts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContexts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContexts without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listContexts = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listContexts( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listContexts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContexts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContexts with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listContexts = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listContexts(request), expectedError); + const actualRequest = (client.innerApiCalls.listContexts as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listContexts as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listContexts with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListContextsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listContexts(request), expectedError); + }); + }); + + describe('getSchema', () => { + it('invokes getSchema without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.Schema() + ); + client.innerApiCalls.getSchema = stubSimpleCall(expectedResponse); + const [response] = await client.getSchema(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchema as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchema as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchema without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.Schema() + ); + client.innerApiCalls.getSchema = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSchema( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchema|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchema as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchema as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchema with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSchema = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSchema(request), expectedError); + const actualRequest = (client.innerApiCalls.getSchema as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchema as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchema with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getSchema(request), expectedError); + }); + }); + + describe('getRawSchema', () => { + it('invokes getRawSchema without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getRawSchema = stubSimpleCall(expectedResponse); + const [response] = await client.getRawSchema(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRawSchema as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRawSchema as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRawSchema without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getRawSchema = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRawSchema( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRawSchema as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRawSchema as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRawSchema with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRawSchema = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRawSchema(request), expectedError); + const actualRequest = (client.innerApiCalls.getRawSchema as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRawSchema as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRawSchema with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRawSchema(request), expectedError); + }); + }); + + describe('listSchemaVersions', () => { + it('invokes listSchemaVersions without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSchemaVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listSchemaVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSchemaVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaVersions without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSchemaVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSchemaVersions( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSchemaVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaVersions with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSchemaVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSchemaVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listSchemaVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaVersions with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listSchemaVersions(request), expectedError); + }); + }); + + describe('listSchemaTypes', () => { + it('invokes listSchemaTypes without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSchemaTypes = stubSimpleCall(expectedResponse); + const [response] = await client.listSchemaTypes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSchemaTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaTypes without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSchemaTypes = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSchemaTypes( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSchemaTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaTypes with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSchemaTypes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSchemaTypes(request), expectedError); + const actualRequest = (client.innerApiCalls.listSchemaTypes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSchemaTypes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSchemaTypes with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSchemaTypesRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listSchemaTypes(request), expectedError); + }); + }); + + describe('listSubjects', () => { + it('invokes listSubjects without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSubjects = stubSimpleCall(expectedResponse); + const [response] = await client.listSubjects(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSubjects as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSubjects as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSubjects without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSubjects = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSubjects( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSubjects as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSubjects as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSubjects with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSubjects = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSubjects(request), expectedError); + const actualRequest = (client.innerApiCalls.listSubjects as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSubjects as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSubjects with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listSubjects(request), expectedError); + }); + }); + + describe('listSubjectsBySchemaId', () => { + it('invokes listSubjectsBySchemaId without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSubjectsBySchemaId = stubSimpleCall(expectedResponse); + const [response] = await client.listSubjectsBySchemaId(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSubjectsBySchemaId as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSubjectsBySchemaId as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSubjectsBySchemaId without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listSubjectsBySchemaId = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listSubjectsBySchemaId( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listSubjectsBySchemaId as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSubjectsBySchemaId as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSubjectsBySchemaId with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listSubjectsBySchemaId = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listSubjectsBySchemaId(request), expectedError); + const actualRequest = (client.innerApiCalls.listSubjectsBySchemaId as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listSubjectsBySchemaId as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listSubjectsBySchemaId with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListSubjectsBySchemaIdRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listSubjectsBySchemaId(request), expectedError); + }); + }); + + describe('deleteSubject', () => { + it('invokes deleteSubject without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.deleteSubject = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSubject(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSubject as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSubject as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSubject without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.deleteSubject = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSubject( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSubject as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSubject as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSubject with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSubject = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteSubject(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteSubject as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSubject as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSubject with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSubjectRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteSubject(request), expectedError); + }); + }); + + describe('lookupVersion', () => { + it('invokes lookupVersion without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion() + ); + client.innerApiCalls.lookupVersion = stubSimpleCall(expectedResponse); + const [response] = await client.lookupVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.lookupVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lookupVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lookupVersion without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion() + ); + client.innerApiCalls.lookupVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.lookupVersion( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.lookupVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lookupVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lookupVersion with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.lookupVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.lookupVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.lookupVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.lookupVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes lookupVersion with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.LookupVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.lookupVersion(request), expectedError); + }); + }); + + describe('getVersion', () => { + it('invokes getVersion without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion() + ); + client.innerApiCalls.getVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaVersion() + ); + client.innerApiCalls.getVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getVersion( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaVersion|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getVersion with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getVersion(request), expectedError); + }); + }); + + describe('getRawSchemaVersion', () => { + it('invokes getRawSchemaVersion without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getRawSchemaVersion = stubSimpleCall(expectedResponse); + const [response] = await client.getRawSchemaVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRawSchemaVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRawSchemaVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRawSchemaVersion without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.getRawSchemaVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getRawSchemaVersion( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getRawSchemaVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRawSchemaVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRawSchemaVersion with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getRawSchemaVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getRawSchemaVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.getRawSchemaVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getRawSchemaVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getRawSchemaVersion with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getRawSchemaVersion(request), expectedError); + }); + }); + + describe('listVersions', () => { + it('invokes listVersions without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersions without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listVersions( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersions with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listVersions with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listVersions(request), expectedError); + }); + }); + + describe('createVersion', () => { + it('invokes createVersion without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse() + ); + client.innerApiCalls.createVersion = stubSimpleCall(expectedResponse); + const [response] = await client.createVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVersion without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateVersionResponse() + ); + client.innerApiCalls.createVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createVersion( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ICreateVersionResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVersion with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.createVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createVersion with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CreateVersionRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.createVersion(request), expectedError); + }); + }); + + describe('deleteVersion', () => { + it('invokes deleteVersion without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.deleteVersion = stubSimpleCall(expectedResponse); + const [response] = await client.deleteVersion(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.deleteVersion = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteVersion( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteVersion = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteVersion(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteVersion as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteVersion with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteVersionRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteVersion(request), expectedError); + }); + }); + + describe('listReferencedSchemas', () => { + it('invokes listReferencedSchemas without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listReferencedSchemas = stubSimpleCall(expectedResponse); + const [response] = await client.listReferencedSchemas(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReferencedSchemas as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReferencedSchemas as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReferencedSchemas without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.api.HttpBody() + ); + client.innerApiCalls.listReferencedSchemas = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listReferencedSchemas( + request, + (err?: Error|null, result?: protos.google.api.IHttpBody|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listReferencedSchemas as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReferencedSchemas as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReferencedSchemas with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listReferencedSchemas = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listReferencedSchemas(request), expectedError); + const actualRequest = (client.innerApiCalls.listReferencedSchemas as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listReferencedSchemas as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listReferencedSchemas with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.ListReferencedSchemasRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.listReferencedSchemas(request), expectedError); + }); + }); + + describe('checkCompatibility', () => { + it('invokes checkCompatibility without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCall(expectedResponse); + const [response] = await client.checkCompatibility(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityResponse() + ); + client.innerApiCalls.checkCompatibility = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkCompatibility( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ICheckCompatibilityResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkCompatibility = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCompatibility(request), expectedError); + const actualRequest = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkCompatibility as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCompatibility with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.CheckCompatibilityRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.checkCompatibility(request), expectedError); + }); + }); + + describe('getSchemaConfig', () => { + it('invokes getSchemaConfig without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig() + ); + client.innerApiCalls.getSchemaConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getSchemaConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaConfig without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig() + ); + client.innerApiCalls.getSchemaConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSchemaConfig( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaConfig with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSchemaConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSchemaConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.getSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaConfig with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getSchemaConfig(request), expectedError); + }); + }); + + describe('updateSchemaConfig', () => { + it('invokes updateSchemaConfig without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig() + ); + client.innerApiCalls.updateSchemaConfig = stubSimpleCall(expectedResponse); + const [response] = await client.updateSchemaConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaConfig without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig() + ); + client.innerApiCalls.updateSchemaConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSchemaConfig( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaConfig with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSchemaConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateSchemaConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.updateSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaConfig with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateSchemaConfig(request), expectedError); + }); + }); + + describe('deleteSchemaConfig', () => { + it('invokes deleteSchemaConfig without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig() + ); + client.innerApiCalls.deleteSchemaConfig = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSchemaConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaConfig without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaConfig() + ); + client.innerApiCalls.deleteSchemaConfig = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSchemaConfig( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaConfig|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaConfig with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSchemaConfig = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteSchemaConfig(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteSchemaConfig as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaConfig as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaConfig with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaConfigRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteSchemaConfig(request), expectedError); + }); + }); + + describe('getSchemaMode', () => { + it('invokes getSchemaMode without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaMode() + ); + client.innerApiCalls.getSchemaMode = stubSimpleCall(expectedResponse); + const [response] = await client.getSchemaMode(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaMode without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaMode() + ); + client.innerApiCalls.getSchemaMode = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getSchemaMode( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaMode with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getSchemaMode = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getSchemaMode(request), expectedError); + const actualRequest = (client.innerApiCalls.getSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getSchemaMode with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.GetSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getSchemaMode(request), expectedError); + }); + }); + + describe('updateSchemaMode', () => { + it('invokes updateSchemaMode without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaMode() + ); + client.innerApiCalls.updateSchemaMode = stubSimpleCall(expectedResponse); + const [response] = await client.updateSchemaMode(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaMode without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaMode() + ); + client.innerApiCalls.updateSchemaMode = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateSchemaMode( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaMode with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateSchemaMode = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateSchemaMode(request), expectedError); + const actualRequest = (client.innerApiCalls.updateSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateSchemaMode with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.UpdateSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.updateSchemaMode(request), expectedError); + }); + }); + + describe('deleteSchemaMode', () => { + it('invokes deleteSchemaMode without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaMode() + ); + client.innerApiCalls.deleteSchemaMode = stubSimpleCall(expectedResponse); + const [response] = await client.deleteSchemaMode(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaMode without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.SchemaMode() + ); + client.innerApiCalls.deleteSchemaMode = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteSchemaMode( + request, + (err?: Error|null, result?: protos.google.cloud.managedkafka.schemaregistry.v1.ISchemaMode|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaMode with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteSchemaMode = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteSchemaMode(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteSchemaMode as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteSchemaMode as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteSchemaMode with closed client', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.managedkafka.schemaregistry.v1.DeleteSchemaModeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.deleteSchemaMode(request), expectedError); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('projectLocationSchemaRegistryCompatibilitySubjectVersions', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryCompatibilitySubjectVersions"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + subject: "subjectValue", + version: "versionValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryCompatibilitySubjectVersionsPath', () => { + const result = client.projectLocationSchemaRegistryCompatibilitySubjectVersionsPath("projectValue", "locationValue", "schemaRegistryValue", "subjectValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName', () => { + const result = client.matchVersionFromProjectLocationSchemaRegistryCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryConfig', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryConfigPath', () => { + const result = client.projectLocationSchemaRegistryConfigPath("projectValue", "locationValue", "schemaRegistryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryConfigName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryConfigName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryConfigName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryConfigName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryContextCompatibilitySubjectVersions', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryContextCompatibilitySubjectVersions"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + subject: "subjectValue", + version: "versionValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPath', () => { + const result = client.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPath("projectValue", "locationValue", "schemaRegistryValue", "contextValue", "subjectValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName', () => { + const result = client.matchContextFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName', () => { + const result = client.matchVersionFromProjectLocationSchemaRegistryContextCompatibilitySubjectVersionsName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextCompatibilitySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryContextConfig', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryContextConfig"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryContextConfigPath', () => { + const result = client.projectLocationSchemaRegistryContextConfigPath("projectValue", "locationValue", "schemaRegistryValue", "contextValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryContextConfigName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryContextConfigName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryContextConfigName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryContextConfigName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryContextConfigName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryContextConfigName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromProjectLocationSchemaRegistryContextConfigName', () => { + const result = client.matchContextFromProjectLocationSchemaRegistryContextConfigName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextConfigPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryContextMode', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryContextMode"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryContextModePath', () => { + const result = client.projectLocationSchemaRegistryContextModePath("projectValue", "locationValue", "schemaRegistryValue", "contextValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryContextModeName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryContextModeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryContextModeName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryContextModeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryContextModeName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryContextModeName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromProjectLocationSchemaRegistryContextModeName', () => { + const result = client.matchContextFromProjectLocationSchemaRegistryContextModeName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextModePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryContextSchemas', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryContextSchemas"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + schema: "schemaValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryContextSchemasPath', () => { + const result = client.projectLocationSchemaRegistryContextSchemasPath("projectValue", "locationValue", "schemaRegistryValue", "contextValue", "schemaValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryContextSchemasName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryContextSchemasName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryContextSchemasName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryContextSchemasName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryContextSchemasName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryContextSchemasName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromProjectLocationSchemaRegistryContextSchemasName', () => { + const result = client.matchContextFromProjectLocationSchemaRegistryContextSchemasName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaFromProjectLocationSchemaRegistryContextSchemasName', () => { + const result = client.matchSchemaFromProjectLocationSchemaRegistryContextSchemasName(fakePath); + assert.strictEqual(result, "schemaValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryContextSubject', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryContextSubject"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + subject: "subjectValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryContextSubjectPath', () => { + const result = client.projectLocationSchemaRegistryContextSubjectPath("projectValue", "locationValue", "schemaRegistryValue", "contextValue", "subjectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryContextSubjectName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryContextSubjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryContextSubjectName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryContextSubjectName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromProjectLocationSchemaRegistryContextSubjectName', () => { + const result = client.matchContextFromProjectLocationSchemaRegistryContextSubjectName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistryContextSubjectName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistryContextSubjectName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryContextSubjectVersions', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryContextSubjectVersions"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + subject: "subjectValue", + version: "versionValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryContextSubjectVersionsPath', () => { + const result = client.projectLocationSchemaRegistryContextSubjectVersionsPath("projectValue", "locationValue", "schemaRegistryValue", "contextValue", "subjectValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryContextSubjectVersionsName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryContextSubjectVersionsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryContextSubjectVersionsName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryContextSubjectVersionsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectVersionsName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectVersionsName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromProjectLocationSchemaRegistryContextSubjectVersionsName', () => { + const result = client.matchContextFromProjectLocationSchemaRegistryContextSubjectVersionsName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistryContextSubjectVersionsName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistryContextSubjectVersionsName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromProjectLocationSchemaRegistryContextSubjectVersionsName', () => { + const result = client.matchVersionFromProjectLocationSchemaRegistryContextSubjectVersionsName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryContextSubjects', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryContextSubjects"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + subject: "subjectValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryContextSubjectsPath', () => { + const result = client.projectLocationSchemaRegistryContextSubjectsPath("projectValue", "locationValue", "schemaRegistryValue", "contextValue", "subjectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryContextSubjectsName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryContextSubjectsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryContextSubjectsName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryContextSubjectsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectsName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryContextSubjectsName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromProjectLocationSchemaRegistryContextSubjectsName', () => { + const result = client.matchContextFromProjectLocationSchemaRegistryContextSubjectsName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistryContextSubjectsName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistryContextSubjectsName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryContextSubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistryMode', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistryMode"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistryModePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistryModePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistryModePath', () => { + const result = client.projectLocationSchemaRegistryModePath("projectValue", "locationValue", "schemaRegistryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistryModePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistryModeName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistryModeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryModePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistryModeName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistryModeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryModePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistryModeName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistryModeName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistryModePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistrySchemas', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistrySchemas"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + schema: "schemaValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistrySchemasPath', () => { + const result = client.projectLocationSchemaRegistrySchemasPath("projectValue", "locationValue", "schemaRegistryValue", "schemaValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistrySchemasName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistrySchemasName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistrySchemasName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistrySchemasName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistrySchemasName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistrySchemasName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaFromProjectLocationSchemaRegistrySchemasName', () => { + const result = client.matchSchemaFromProjectLocationSchemaRegistrySchemasName(fakePath); + assert.strictEqual(result, "schemaValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySchemasPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistrySubject', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistrySubject"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + subject: "subjectValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistrySubjectPath', () => { + const result = client.projectLocationSchemaRegistrySubjectPath("projectValue", "locationValue", "schemaRegistryValue", "subjectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistrySubjectName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistrySubjectName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistrySubjectName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistrySubjectName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistrySubjectName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistrySubjectName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistrySubjectVersions', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistrySubjectVersions"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + subject: "subjectValue", + version: "versionValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistrySubjectVersionsPath', () => { + const result = client.projectLocationSchemaRegistrySubjectVersionsPath("projectValue", "locationValue", "schemaRegistryValue", "subjectValue", "versionValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistrySubjectVersionsName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistrySubjectVersionsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistrySubjectVersionsName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistrySubjectVersionsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectVersionsName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectVersionsName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistrySubjectVersionsName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistrySubjectVersionsName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchVersionFromProjectLocationSchemaRegistrySubjectVersionsName', () => { + const result = client.matchVersionFromProjectLocationSchemaRegistrySubjectVersionsName(fakePath); + assert.strictEqual(result, "versionValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectVersionsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationSchemaRegistrySubjects', async () => { + const fakePath = "/rendered/path/projectLocationSchemaRegistrySubjects"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + subject: "subjectValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationSchemaRegistrySubjectsPath', () => { + const result = client.projectLocationSchemaRegistrySubjectsPath("projectValue", "locationValue", "schemaRegistryValue", "subjectValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationSchemaRegistrySubjectsName', () => { + const result = client.matchProjectFromProjectLocationSchemaRegistrySubjectsName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationSchemaRegistrySubjectsName', () => { + const result = client.matchLocationFromProjectLocationSchemaRegistrySubjectsName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectsName', () => { + const result = client.matchSchemaRegistryFromProjectLocationSchemaRegistrySubjectsName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSubjectFromProjectLocationSchemaRegistrySubjectsName', () => { + const result = client.matchSubjectFromProjectLocationSchemaRegistrySubjectsName(fakePath); + assert.strictEqual(result, "subjectValue"); + assert((client.pathTemplates.projectLocationSchemaRegistrySubjectsPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('schemaContext', async () => { + const fakePath = "/rendered/path/schemaContext"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + context: "contextValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.schemaContextPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.schemaContextPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('schemaContextPath', () => { + const result = client.schemaContextPath("projectValue", "locationValue", "schemaRegistryValue", "contextValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.schemaContextPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSchemaContextName', () => { + const result = client.matchProjectFromSchemaContextName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.schemaContextPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSchemaContextName', () => { + const result = client.matchLocationFromSchemaContextName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.schemaContextPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromSchemaContextName', () => { + const result = client.matchSchemaRegistryFromSchemaContextName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.schemaContextPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchContextFromSchemaContextName', () => { + const result = client.matchContextFromSchemaContextName(fakePath); + assert.strictEqual(result, "contextValue"); + assert((client.pathTemplates.schemaContextPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('schemaRegistry', async () => { + const fakePath = "/rendered/path/schemaRegistry"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + schema_registry: "schemaRegistryValue", + }; + const client = new managedschemaregistryModule.v1.ManagedSchemaRegistryClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.schemaRegistryPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.schemaRegistryPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('schemaRegistryPath', () => { + const result = client.schemaRegistryPath("projectValue", "locationValue", "schemaRegistryValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.schemaRegistryPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromSchemaRegistryName', () => { + const result = client.matchProjectFromSchemaRegistryName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.schemaRegistryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromSchemaRegistryName', () => { + const result = client.matchLocationFromSchemaRegistryName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.schemaRegistryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchSchemaRegistryFromSchemaRegistryName', () => { + const result = client.matchSchemaRegistryFromSchemaRegistryName(fakePath); + assert.strictEqual(result, "schemaRegistryValue"); + assert((client.pathTemplates.schemaRegistryPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-managedkafka-schemaregistry/tsconfig.json b/packages/google-cloud-managedkafka-schemaregistry/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/packages/google-cloud-managedkafka-schemaregistry/webpack.config.js b/packages/google-cloud-managedkafka-schemaregistry/webpack.config.js new file mode 100644 index 000000000000..fa63d56de77f --- /dev/null +++ b/packages/google-cloud-managedkafka-schemaregistry/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: 'ManagedSchemaRegistry', + filename: './managed-schema-registry.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; diff --git a/packages/google-cloud-networksecurity/CHANGELOG.md b/packages/google-cloud-networksecurity/CHANGELOG.md index 26958e79264d..26ac37f1d8c0 100644 --- a/packages/google-cloud-networksecurity/CHANGELOG.md +++ b/packages/google-cloud-networksecurity/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.3.0](https://github.com/googleapis/google-cloud-node/compare/network-security-v3.2.0...network-security-v3.3.0) (2025-07-17) + + +### Features + +* [networksecurity] publish v1alpha1 Network Security API client and ClientTlsPolicy API resource ([#6486](https://github.com/googleapis/google-cloud-node/issues/6486)) ([971ea02](https://github.com/googleapis/google-cloud-node/commit/971ea02c65b80f9d92340935f619d1e2e320ce83)) + ## [3.2.0](https://github.com/googleapis/google-cloud-node/compare/network-security-v3.1.0...network-security-v3.2.0) (2025-07-09) diff --git a/packages/google-cloud-networksecurity/README.md b/packages/google-cloud-networksecurity/README.md index f497e7d44701..da0dad4f24d2 100644 --- a/packages/google-cloud-networksecurity/README.md +++ b/packages/google-cloud-networksecurity/README.md @@ -77,6 +77,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Network_security.update_authorization_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1/network_security.update_authorization_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1/network_security.update_authorization_policy.js,packages/google-cloud-networksecurity/samples/README.md) | | Network_security.update_client_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1/network_security.update_client_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1/network_security.update_client_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | | Network_security.update_server_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1/network_security.update_server_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1/network_security.update_server_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | +| Network_security.create_client_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | +| Network_security.delete_client_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | +| Network_security.get_client_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | +| Network_security.list_client_tls_policies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js,packages/google-cloud-networksecurity/samples/README.md) | +| Network_security.update_client_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | | Network_security.create_authorization_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1beta1/network_security.create_authorization_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1beta1/network_security.create_authorization_policy.js,packages/google-cloud-networksecurity/samples/README.md) | | Network_security.create_client_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1beta1/network_security.create_client_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1beta1/network_security.create_client_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | | Network_security.create_server_tls_policy | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1beta1/network_security.create_server_tls_policy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1beta1/network_security.create_server_tls_policy.js,packages/google-cloud-networksecurity/samples/README.md) | diff --git a/packages/google-cloud-networksecurity/package.json b/packages/google-cloud-networksecurity/package.json index 968596a50cf8..65c179126063 100644 --- a/packages/google-cloud-networksecurity/package.json +++ b/packages/google-cloud-networksecurity/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/network-security", - "version": "3.2.0", + "version": "3.3.0", "description": "networksecurity client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/client_tls_policy.proto b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/client_tls_policy.proto new file mode 100644 index 000000000000..f9199018352e --- /dev/null +++ b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/client_tls_policy.proto @@ -0,0 +1,169 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.networksecurity.v1alpha1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/networksecurity/v1alpha1/tls.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkSecurity.V1Alpha1"; +option go_package = "cloud.google.com/go/networksecurity/apiv1alpha1/networksecuritypb;networksecuritypb"; +option java_multiple_files = true; +option java_outer_classname = "ClientTlsPolicyProto"; +option java_package = "com.google.cloud.networksecurity.v1alpha1"; +option php_namespace = "Google\\Cloud\\NetworkSecurity\\V1alpha1"; +option ruby_package = "Google::Cloud::NetworkSecurity::V1alpha1"; + +// ClientTlsPolicy is a resource that specifies how a client should authenticate +// connections to backends of a service. This resource itself does not affect +// configuration unless it is attached to a backend service resource. +message ClientTlsPolicy { + option (google.api.resource) = { + type: "networksecurity.googleapis.com/ClientTlsPolicy" + pattern: "projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}" + }; + + // Required. Name of the ClientTlsPolicy resource. It matches the pattern + // `projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}` + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Free-text description of the resource. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The timestamp when the resource was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp when the resource was updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Set of label tags associated with the resource. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Server Name Indication string to present to the server during TLS + // handshake. E.g: "secure.example.com". + string sni = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines a mechanism to provision client identity (public and + // private keys) for peer to peer authentication. The presence of this + // dictates mTLS. + CertificateProvider client_certificate = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the mechanism to obtain the Certificate Authority + // certificate to validate the server certificate. If empty, client does not + // validate the server certificate. + repeated ValidationCA server_validation_ca = 8 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request used by the ListClientTlsPolicies method. +message ListClientTlsPoliciesRequest { + // Required. The project and location from which the ClientTlsPolicies should + // be listed, specified in the format `projects/*/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networksecurity.googleapis.com/ClientTlsPolicy" + } + ]; + + // Maximum number of ClientTlsPolicies to return per call. + int32 page_size = 2; + + // The value returned by the last `ListClientTlsPoliciesResponse` + // Indicates that this is a continuation of a prior + // `ListClientTlsPolicies` call, and that the system + // should return the next page of data. + string page_token = 3; +} + +// Response returned by the ListClientTlsPolicies method. +message ListClientTlsPoliciesResponse { + // List of ClientTlsPolicy resources. + repeated ClientTlsPolicy client_tls_policies = 1; + + // If there might be more results than those appearing in this response, then + // `next_page_token` is included. To get the next set of results, call this + // method again using the value of `next_page_token` as `page_token`. + string next_page_token = 2; +} + +// Request used by the GetClientTlsPolicy method. +message GetClientTlsPolicyRequest { + // Required. A name of the ClientTlsPolicy to get. Must be in the format + // `projects/*/locations/{location}/clientTlsPolicies/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networksecurity.googleapis.com/ClientTlsPolicy" + } + ]; +} + +// Request used by the CreateClientTlsPolicy method. +message CreateClientTlsPolicyRequest { + // Required. The parent resource of the ClientTlsPolicy. Must be in + // the format `projects/*/locations/{location}`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "networksecurity.googleapis.com/ClientTlsPolicy" + } + ]; + + // Required. Short name of the ClientTlsPolicy resource to be created. This + // value should be 1-63 characters long, containing only letters, numbers, + // hyphens, and underscores, and should not start with a number. E.g. + // "client_mtls_policy". + string client_tls_policy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. ClientTlsPolicy resource to be created. + ClientTlsPolicy client_tls_policy = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request used by UpdateClientTlsPolicy method. +message UpdateClientTlsPolicyRequest { + // Optional. Field mask is used to specify the fields to be overwritten in the + // ClientTlsPolicy resource by the update. The fields + // specified in the update_mask are relative to the resource, not + // the full request. A field will be overwritten if it is in the + // mask. If the user does not provide a mask then all fields will be + // overwritten. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. Updated ClientTlsPolicy resource. + ClientTlsPolicy client_tls_policy = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request used by the DeleteClientTlsPolicy method. +message DeleteClientTlsPolicyRequest { + // Required. A name of the ClientTlsPolicy to delete. Must be in + // the format `projects/*/locations/{location}/clientTlsPolicies/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "networksecurity.googleapis.com/ClientTlsPolicy" + } + ]; +} diff --git a/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/common.proto b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/common.proto new file mode 100644 index 000000000000..55f5f258b867 --- /dev/null +++ b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/common.proto @@ -0,0 +1,58 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.networksecurity.v1alpha1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.NetworkSecurity.V1Alpha1"; +option go_package = "cloud.google.com/go/networksecurity/apiv1alpha1/networksecuritypb;networksecuritypb"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.networksecurity.v1alpha1"; +option php_namespace = "Google\\Cloud\\NetworkSecurity\\V1alpha1"; +option ruby_package = "Google::Cloud::NetworkSecurity::V1alpha1"; + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // 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. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/network_security.proto b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/network_security.proto new file mode 100644 index 000000000000..b142e80c7ff9 --- /dev/null +++ b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/network_security.proto @@ -0,0 +1,99 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.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.networksecurity.v1alpha1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/cloud/networksecurity/v1alpha1/client_tls_policy.proto"; +import "google/cloud/networksecurity/v1alpha1/common.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Cloud.NetworkSecurity.V1Alpha1"; +option go_package = "cloud.google.com/go/networksecurity/apiv1alpha1/networksecuritypb;networksecuritypb"; +option java_multiple_files = true; +option java_package = "com.google.cloud.networksecurity.v1alpha1"; +option php_namespace = "Google\\Cloud\\NetworkSecurity\\V1alpha1"; +option ruby_package = "Google::Cloud::NetworkSecurity::V1alpha1"; + +// Network Security API provides resources to configure authentication and +// authorization policies. Refer to per API resource documentation for more +// information. +service NetworkSecurity { + option (google.api.default_host) = "networksecurity.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists ClientTlsPolicies in a given project and location. + rpc ListClientTlsPolicies(ListClientTlsPoliciesRequest) + returns (ListClientTlsPoliciesResponse) { + option (google.api.http) = { + get: "/v1alpha1/{parent=projects/*/locations/*}/clientTlsPolicies" + }; + option (google.api.method_signature) = "parent"; + } + + // Gets details of a single ClientTlsPolicy. + rpc GetClientTlsPolicy(GetClientTlsPolicyRequest) returns (ClientTlsPolicy) { + option (google.api.http) = { + get: "/v1alpha1/{name=projects/*/locations/*/clientTlsPolicies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new ClientTlsPolicy in a given project and location. + rpc CreateClientTlsPolicy(CreateClientTlsPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1alpha1/{parent=projects/*/locations/*}/clientTlsPolicies" + body: "client_tls_policy" + }; + option (google.api.method_signature) = + "parent,client_tls_policy,client_tls_policy_id"; + option (google.longrunning.operation_info) = { + response_type: "ClientTlsPolicy" + metadata_type: "google.cloud.networksecurity.v1alpha1.OperationMetadata" + }; + } + + // Updates the parameters of a single ClientTlsPolicy. + rpc UpdateClientTlsPolicy(UpdateClientTlsPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1alpha1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}" + body: "client_tls_policy" + }; + option (google.api.method_signature) = "client_tls_policy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ClientTlsPolicy" + metadata_type: "google.cloud.networksecurity.v1alpha1.OperationMetadata" + }; + } + + // Deletes a single ClientTlsPolicy. + rpc DeleteClientTlsPolicy(DeleteClientTlsPolicyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1alpha1/{name=projects/*/locations/*/clientTlsPolicies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.networksecurity.v1alpha1.OperationMetadata" + }; + } +} diff --git a/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/tls.proto b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/tls.proto new file mode 100644 index 000000000000..db827be48b33 --- /dev/null +++ b/packages/google-cloud-networksecurity/protos/google/cloud/networksecurity/v1alpha1/tls.proto @@ -0,0 +1,96 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.networksecurity.v1alpha1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.NetworkSecurity.V1Alpha1"; +option go_package = "cloud.google.com/go/networksecurity/apiv1alpha1/networksecuritypb;networksecuritypb"; +option java_multiple_files = true; +option java_outer_classname = "TlsProto"; +option java_package = "com.google.cloud.networksecurity.v1alpha1"; +option php_namespace = "Google\\Cloud\\NetworkSecurity\\V1alpha1"; +option ruby_package = "Google::Cloud::NetworkSecurity::V1alpha1"; + +// Specification of the GRPC Endpoint. +message GrpcEndpoint { + // Required. The target URI of the gRPC endpoint. Only UDS path is supported, + // and should start with "unix:". + string target_uri = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Specification of ValidationCA. Defines the mechanism to obtain the +// Certificate Authority certificate to validate the peer certificate. +message ValidationCA { + // The type of certificate provider which provides the CA certificate. + oneof type { + // The path to the file holding the CA certificate to validate the client or + // server certificate. + string ca_cert_path = 1; + + // gRPC specific configuration to access the gRPC server to + // obtain the CA certificate. + GrpcEndpoint grpc_endpoint = 2; + + // The certificate provider instance specification that will be passed to + // the data plane, which will be used to load necessary credential + // information. + CertificateProviderInstance certificate_provider_instance = 3; + } +} + +// Specification of a TLS certificate provider instance. Workloads may have one +// or more CertificateProvider instances (plugins) and one of them is enabled +// and configured by specifying this message. Workloads use the values from this +// message to locate and load the CertificateProvider instance configuration. +message CertificateProviderInstance { + // Required. Plugin instance name, used to locate and load CertificateProvider + // instance configuration. Set to "google_cloud_private_spiffe" to use + // Certificate Authority Service certificate provider instance. + string plugin_instance = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Specification of certificate provider. Defines the mechanism to obtain the +// certificate and private key for peer to peer authentication. +message CertificateProvider { + // Specification of TLS certificate files. + message TlsCertificateFiles { + // Required. The path to the file that has the certificate containing public + // key. + string certificate_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The path to the file that has the private key. + string private_key_path = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The type of certificate provider which provides the certificates and + // private keys. + oneof type { + // Obtain certificates and private key from a locally mounted + // filesystem path. + TlsCertificateFiles local_filepath = 1; + + // gRPC specific configuration to access the gRPC server to + // obtain the cert and private key. + GrpcEndpoint grpc_endpoint = 2; + + // The certificate provider instance specification that will be passed to + // the data plane, which will be used to load necessary credential + // information. + CertificateProviderInstance certificate_provider_instance = 3; + } +} diff --git a/packages/google-cloud-networksecurity/protos/protos.d.ts b/packages/google-cloud-networksecurity/protos/protos.d.ts index 51dfdab16175..eb7cc4561021 100644 --- a/packages/google-cloud-networksecurity/protos/protos.d.ts +++ b/packages/google-cloud-networksecurity/protos/protos.d.ts @@ -3713,6 +3713,1553 @@ export namespace google { } } + /** Namespace v1alpha1. */ + namespace v1alpha1 { + + /** Properties of a ClientTlsPolicy. */ + interface IClientTlsPolicy { + + /** ClientTlsPolicy name */ + name?: (string|null); + + /** ClientTlsPolicy description */ + description?: (string|null); + + /** ClientTlsPolicy createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ClientTlsPolicy updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ClientTlsPolicy labels */ + labels?: ({ [k: string]: string }|null); + + /** ClientTlsPolicy sni */ + sni?: (string|null); + + /** ClientTlsPolicy clientCertificate */ + clientCertificate?: (google.cloud.networksecurity.v1alpha1.ICertificateProvider|null); + + /** ClientTlsPolicy serverValidationCa */ + serverValidationCa?: (google.cloud.networksecurity.v1alpha1.IValidationCA[]|null); + } + + /** Represents a ClientTlsPolicy. */ + class ClientTlsPolicy implements IClientTlsPolicy { + + /** + * Constructs a new ClientTlsPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IClientTlsPolicy); + + /** ClientTlsPolicy name. */ + public name: string; + + /** ClientTlsPolicy description. */ + public description: string; + + /** ClientTlsPolicy createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ClientTlsPolicy updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ClientTlsPolicy labels. */ + public labels: { [k: string]: string }; + + /** ClientTlsPolicy sni. */ + public sni: string; + + /** ClientTlsPolicy clientCertificate. */ + public clientCertificate?: (google.cloud.networksecurity.v1alpha1.ICertificateProvider|null); + + /** ClientTlsPolicy serverValidationCa. */ + public serverValidationCa: google.cloud.networksecurity.v1alpha1.IValidationCA[]; + + /** + * Creates a new ClientTlsPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientTlsPolicy instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IClientTlsPolicy): google.cloud.networksecurity.v1alpha1.ClientTlsPolicy; + + /** + * Encodes the specified ClientTlsPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.verify|verify} messages. + * @param message ClientTlsPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientTlsPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.verify|verify} messages. + * @param message ClientTlsPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientTlsPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientTlsPolicy + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.ClientTlsPolicy; + + /** + * Decodes a ClientTlsPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientTlsPolicy + * @throws {Error} If the payload 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.networksecurity.v1alpha1.ClientTlsPolicy; + + /** + * Verifies a ClientTlsPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientTlsPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientTlsPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.ClientTlsPolicy; + + /** + * Creates a plain object from a ClientTlsPolicy message. Also converts values to other types if specified. + * @param message ClientTlsPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.ClientTlsPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientTlsPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientTlsPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClientTlsPoliciesRequest. */ + interface IListClientTlsPoliciesRequest { + + /** ListClientTlsPoliciesRequest parent */ + parent?: (string|null); + + /** ListClientTlsPoliciesRequest pageSize */ + pageSize?: (number|null); + + /** ListClientTlsPoliciesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListClientTlsPoliciesRequest. */ + class ListClientTlsPoliciesRequest implements IListClientTlsPoliciesRequest { + + /** + * Constructs a new ListClientTlsPoliciesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest); + + /** ListClientTlsPoliciesRequest parent. */ + public parent: string; + + /** ListClientTlsPoliciesRequest pageSize. */ + public pageSize: number; + + /** ListClientTlsPoliciesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListClientTlsPoliciesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClientTlsPoliciesRequest instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest): google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest; + + /** + * Encodes the specified ListClientTlsPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest.verify|verify} messages. + * @param message ListClientTlsPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClientTlsPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest.verify|verify} messages. + * @param message ListClientTlsPoliciesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClientTlsPoliciesRequest + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.ListClientTlsPoliciesRequest; + + /** + * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClientTlsPoliciesRequest + * @throws {Error} If the payload 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.networksecurity.v1alpha1.ListClientTlsPoliciesRequest; + + /** + * Verifies a ListClientTlsPoliciesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClientTlsPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClientTlsPoliciesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest; + + /** + * Creates a plain object from a ListClientTlsPoliciesRequest message. Also converts values to other types if specified. + * @param message ListClientTlsPoliciesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClientTlsPoliciesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClientTlsPoliciesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListClientTlsPoliciesResponse. */ + interface IListClientTlsPoliciesResponse { + + /** ListClientTlsPoliciesResponse clientTlsPolicies */ + clientTlsPolicies?: (google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[]|null); + + /** ListClientTlsPoliciesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListClientTlsPoliciesResponse. */ + class ListClientTlsPoliciesResponse implements IListClientTlsPoliciesResponse { + + /** + * Constructs a new ListClientTlsPoliciesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse); + + /** ListClientTlsPoliciesResponse clientTlsPolicies. */ + public clientTlsPolicies: google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[]; + + /** ListClientTlsPoliciesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListClientTlsPoliciesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListClientTlsPoliciesResponse instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse): google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse; + + /** + * Encodes the specified ListClientTlsPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse.verify|verify} messages. + * @param message ListClientTlsPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListClientTlsPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse.verify|verify} messages. + * @param message ListClientTlsPoliciesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListClientTlsPoliciesResponse + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.ListClientTlsPoliciesResponse; + + /** + * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListClientTlsPoliciesResponse + * @throws {Error} If the payload 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.networksecurity.v1alpha1.ListClientTlsPoliciesResponse; + + /** + * Verifies a ListClientTlsPoliciesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListClientTlsPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListClientTlsPoliciesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse; + + /** + * Creates a plain object from a ListClientTlsPoliciesResponse message. Also converts values to other types if specified. + * @param message ListClientTlsPoliciesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListClientTlsPoliciesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListClientTlsPoliciesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetClientTlsPolicyRequest. */ + interface IGetClientTlsPolicyRequest { + + /** GetClientTlsPolicyRequest name */ + name?: (string|null); + } + + /** Represents a GetClientTlsPolicyRequest. */ + class GetClientTlsPolicyRequest implements IGetClientTlsPolicyRequest { + + /** + * Constructs a new GetClientTlsPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest); + + /** GetClientTlsPolicyRequest name. */ + public name: string; + + /** + * Creates a new GetClientTlsPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetClientTlsPolicyRequest instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest): google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest; + + /** + * Encodes the specified GetClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest.verify|verify} messages. + * @param message GetClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest.verify|verify} messages. + * @param message GetClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetClientTlsPolicyRequest + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.GetClientTlsPolicyRequest; + + /** + * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetClientTlsPolicyRequest + * @throws {Error} If the payload 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.networksecurity.v1alpha1.GetClientTlsPolicyRequest; + + /** + * Verifies a GetClientTlsPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetClientTlsPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest; + + /** + * Creates a plain object from a GetClientTlsPolicyRequest message. Also converts values to other types if specified. + * @param message GetClientTlsPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetClientTlsPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetClientTlsPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateClientTlsPolicyRequest. */ + interface ICreateClientTlsPolicyRequest { + + /** CreateClientTlsPolicyRequest parent */ + parent?: (string|null); + + /** CreateClientTlsPolicyRequest clientTlsPolicyId */ + clientTlsPolicyId?: (string|null); + + /** CreateClientTlsPolicyRequest clientTlsPolicy */ + clientTlsPolicy?: (google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null); + } + + /** Represents a CreateClientTlsPolicyRequest. */ + class CreateClientTlsPolicyRequest implements ICreateClientTlsPolicyRequest { + + /** + * Constructs a new CreateClientTlsPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest); + + /** CreateClientTlsPolicyRequest parent. */ + public parent: string; + + /** CreateClientTlsPolicyRequest clientTlsPolicyId. */ + public clientTlsPolicyId: string; + + /** CreateClientTlsPolicyRequest clientTlsPolicy. */ + public clientTlsPolicy?: (google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null); + + /** + * Creates a new CreateClientTlsPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateClientTlsPolicyRequest instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest): google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest; + + /** + * Encodes the specified CreateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest.verify|verify} messages. + * @param message CreateClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest.verify|verify} messages. + * @param message CreateClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateClientTlsPolicyRequest + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.CreateClientTlsPolicyRequest; + + /** + * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateClientTlsPolicyRequest + * @throws {Error} If the payload 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.networksecurity.v1alpha1.CreateClientTlsPolicyRequest; + + /** + * Verifies a CreateClientTlsPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateClientTlsPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest; + + /** + * Creates a plain object from a CreateClientTlsPolicyRequest message. Also converts values to other types if specified. + * @param message CreateClientTlsPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateClientTlsPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateClientTlsPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateClientTlsPolicyRequest. */ + interface IUpdateClientTlsPolicyRequest { + + /** UpdateClientTlsPolicyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateClientTlsPolicyRequest clientTlsPolicy */ + clientTlsPolicy?: (google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null); + } + + /** Represents an UpdateClientTlsPolicyRequest. */ + class UpdateClientTlsPolicyRequest implements IUpdateClientTlsPolicyRequest { + + /** + * Constructs a new UpdateClientTlsPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest); + + /** UpdateClientTlsPolicyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateClientTlsPolicyRequest clientTlsPolicy. */ + public clientTlsPolicy?: (google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null); + + /** + * Creates a new UpdateClientTlsPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateClientTlsPolicyRequest instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest): google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest; + + /** + * Encodes the specified UpdateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest.verify|verify} messages. + * @param message UpdateClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest.verify|verify} messages. + * @param message UpdateClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateClientTlsPolicyRequest + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest; + + /** + * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateClientTlsPolicyRequest + * @throws {Error} If the payload 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.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest; + + /** + * Verifies an UpdateClientTlsPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateClientTlsPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest; + + /** + * Creates a plain object from an UpdateClientTlsPolicyRequest message. Also converts values to other types if specified. + * @param message UpdateClientTlsPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateClientTlsPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateClientTlsPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteClientTlsPolicyRequest. */ + interface IDeleteClientTlsPolicyRequest { + + /** DeleteClientTlsPolicyRequest name */ + name?: (string|null); + } + + /** Represents a DeleteClientTlsPolicyRequest. */ + class DeleteClientTlsPolicyRequest implements IDeleteClientTlsPolicyRequest { + + /** + * Constructs a new DeleteClientTlsPolicyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest); + + /** DeleteClientTlsPolicyRequest name. */ + public name: string; + + /** + * Creates a new DeleteClientTlsPolicyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteClientTlsPolicyRequest instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest): google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest; + + /** + * Encodes the specified DeleteClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest.verify|verify} messages. + * @param message DeleteClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest.verify|verify} messages. + * @param message DeleteClientTlsPolicyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteClientTlsPolicyRequest + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest; + + /** + * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteClientTlsPolicyRequest + * @throws {Error} If the payload 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.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest; + + /** + * Verifies a DeleteClientTlsPolicyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteClientTlsPolicyRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest; + + /** + * Creates a plain object from a DeleteClientTlsPolicyRequest message. Also converts values to other types if specified. + * @param message DeleteClientTlsPolicyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteClientTlsPolicyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteClientTlsPolicyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GrpcEndpoint. */ + interface IGrpcEndpoint { + + /** GrpcEndpoint targetUri */ + targetUri?: (string|null); + } + + /** Represents a GrpcEndpoint. */ + class GrpcEndpoint implements IGrpcEndpoint { + + /** + * Constructs a new GrpcEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IGrpcEndpoint); + + /** GrpcEndpoint targetUri. */ + public targetUri: string; + + /** + * Creates a new GrpcEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns GrpcEndpoint instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IGrpcEndpoint): google.cloud.networksecurity.v1alpha1.GrpcEndpoint; + + /** + * Encodes the specified GrpcEndpoint message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GrpcEndpoint.verify|verify} messages. + * @param message GrpcEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IGrpcEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GrpcEndpoint message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GrpcEndpoint.verify|verify} messages. + * @param message GrpcEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IGrpcEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GrpcEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GrpcEndpoint + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.GrpcEndpoint; + + /** + * Decodes a GrpcEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GrpcEndpoint + * @throws {Error} If the payload 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.networksecurity.v1alpha1.GrpcEndpoint; + + /** + * Verifies a GrpcEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GrpcEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GrpcEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.GrpcEndpoint; + + /** + * Creates a plain object from a GrpcEndpoint message. Also converts values to other types if specified. + * @param message GrpcEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.GrpcEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GrpcEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GrpcEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ValidationCA. */ + interface IValidationCA { + + /** ValidationCA caCertPath */ + caCertPath?: (string|null); + + /** ValidationCA grpcEndpoint */ + grpcEndpoint?: (google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null); + + /** ValidationCA certificateProviderInstance */ + certificateProviderInstance?: (google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null); + } + + /** Represents a ValidationCA. */ + class ValidationCA implements IValidationCA { + + /** + * Constructs a new ValidationCA. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IValidationCA); + + /** ValidationCA caCertPath. */ + public caCertPath?: (string|null); + + /** ValidationCA grpcEndpoint. */ + public grpcEndpoint?: (google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null); + + /** ValidationCA certificateProviderInstance. */ + public certificateProviderInstance?: (google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null); + + /** ValidationCA type. */ + public type?: ("caCertPath"|"grpcEndpoint"|"certificateProviderInstance"); + + /** + * Creates a new ValidationCA instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidationCA instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IValidationCA): google.cloud.networksecurity.v1alpha1.ValidationCA; + + /** + * Encodes the specified ValidationCA message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ValidationCA.verify|verify} messages. + * @param message ValidationCA message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IValidationCA, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidationCA message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ValidationCA.verify|verify} messages. + * @param message ValidationCA message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IValidationCA, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidationCA message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidationCA + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.ValidationCA; + + /** + * Decodes a ValidationCA message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidationCA + * @throws {Error} If the payload 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.networksecurity.v1alpha1.ValidationCA; + + /** + * Verifies a ValidationCA message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidationCA message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidationCA + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.ValidationCA; + + /** + * Creates a plain object from a ValidationCA message. Also converts values to other types if specified. + * @param message ValidationCA + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.ValidationCA, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidationCA to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValidationCA + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CertificateProviderInstance. */ + interface ICertificateProviderInstance { + + /** CertificateProviderInstance pluginInstance */ + pluginInstance?: (string|null); + } + + /** Represents a CertificateProviderInstance. */ + class CertificateProviderInstance implements ICertificateProviderInstance { + + /** + * Constructs a new CertificateProviderInstance. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance); + + /** CertificateProviderInstance pluginInstance. */ + public pluginInstance: string; + + /** + * Creates a new CertificateProviderInstance instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateProviderInstance instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance): google.cloud.networksecurity.v1alpha1.CertificateProviderInstance; + + /** + * Encodes the specified CertificateProviderInstance message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.verify|verify} messages. + * @param message CertificateProviderInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateProviderInstance message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.verify|verify} messages. + * @param message CertificateProviderInstance message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateProviderInstance message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateProviderInstance + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.CertificateProviderInstance; + + /** + * Decodes a CertificateProviderInstance message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateProviderInstance + * @throws {Error} If the payload 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.networksecurity.v1alpha1.CertificateProviderInstance; + + /** + * Verifies a CertificateProviderInstance message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateProviderInstance message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateProviderInstance + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.CertificateProviderInstance; + + /** + * Creates a plain object from a CertificateProviderInstance message. Also converts values to other types if specified. + * @param message CertificateProviderInstance + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.CertificateProviderInstance, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateProviderInstance to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateProviderInstance + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CertificateProvider. */ + interface ICertificateProvider { + + /** CertificateProvider localFilepath */ + localFilepath?: (google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles|null); + + /** CertificateProvider grpcEndpoint */ + grpcEndpoint?: (google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null); + + /** CertificateProvider certificateProviderInstance */ + certificateProviderInstance?: (google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null); + } + + /** Represents a CertificateProvider. */ + class CertificateProvider implements ICertificateProvider { + + /** + * Constructs a new CertificateProvider. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.ICertificateProvider); + + /** CertificateProvider localFilepath. */ + public localFilepath?: (google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles|null); + + /** CertificateProvider grpcEndpoint. */ + public grpcEndpoint?: (google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null); + + /** CertificateProvider certificateProviderInstance. */ + public certificateProviderInstance?: (google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null); + + /** CertificateProvider type. */ + public type?: ("localFilepath"|"grpcEndpoint"|"certificateProviderInstance"); + + /** + * Creates a new CertificateProvider instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateProvider instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.ICertificateProvider): google.cloud.networksecurity.v1alpha1.CertificateProvider; + + /** + * Encodes the specified CertificateProvider message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.verify|verify} messages. + * @param message CertificateProvider message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.ICertificateProvider, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateProvider message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.verify|verify} messages. + * @param message CertificateProvider message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.ICertificateProvider, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateProvider message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateProvider + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.CertificateProvider; + + /** + * Decodes a CertificateProvider message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateProvider + * @throws {Error} If the payload 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.networksecurity.v1alpha1.CertificateProvider; + + /** + * Verifies a CertificateProvider message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateProvider message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateProvider + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.CertificateProvider; + + /** + * Creates a plain object from a CertificateProvider message. Also converts values to other types if specified. + * @param message CertificateProvider + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.CertificateProvider, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateProvider to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateProvider + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CertificateProvider { + + /** Properties of a TlsCertificateFiles. */ + interface ITlsCertificateFiles { + + /** TlsCertificateFiles certificatePath */ + certificatePath?: (string|null); + + /** TlsCertificateFiles privateKeyPath */ + privateKeyPath?: (string|null); + } + + /** Represents a TlsCertificateFiles. */ + class TlsCertificateFiles implements ITlsCertificateFiles { + + /** + * Constructs a new TlsCertificateFiles. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles); + + /** TlsCertificateFiles certificatePath. */ + public certificatePath: string; + + /** TlsCertificateFiles privateKeyPath. */ + public privateKeyPath: string; + + /** + * Creates a new TlsCertificateFiles instance using the specified properties. + * @param [properties] Properties to set + * @returns TlsCertificateFiles instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles): google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles; + + /** + * Encodes the specified TlsCertificateFiles message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.verify|verify} messages. + * @param message TlsCertificateFiles message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TlsCertificateFiles message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.verify|verify} messages. + * @param message TlsCertificateFiles message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TlsCertificateFiles message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TlsCertificateFiles + * @throws {Error} If the payload is not 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.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles; + + /** + * Decodes a TlsCertificateFiles message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TlsCertificateFiles + * @throws {Error} If the payload 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.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles; + + /** + * Verifies a TlsCertificateFiles message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TlsCertificateFiles message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TlsCertificateFiles + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles; + + /** + * Creates a plain object from a TlsCertificateFiles message. Also converts values to other types if specified. + * @param message TlsCertificateFiles + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TlsCertificateFiles to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TlsCertificateFiles + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.networksecurity.v1alpha1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.networksecurity.v1alpha1.IOperationMetadata): google.cloud.networksecurity.v1alpha1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.networksecurity.v1alpha1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.networksecurity.v1alpha1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.networksecurity.v1alpha1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.networksecurity.v1alpha1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.networksecurity.v1alpha1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.networksecurity.v1alpha1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a NetworkSecurity */ + class NetworkSecurity extends $protobuf.rpc.Service { + + /** + * Constructs a new NetworkSecurity 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 NetworkSecurity 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): NetworkSecurity; + + /** + * Calls ListClientTlsPolicies. + * @param request ListClientTlsPoliciesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListClientTlsPoliciesResponse + */ + public listClientTlsPolicies(request: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, callback: google.cloud.networksecurity.v1alpha1.NetworkSecurity.ListClientTlsPoliciesCallback): void; + + /** + * Calls ListClientTlsPolicies. + * @param request ListClientTlsPoliciesRequest message or plain object + * @returns Promise + */ + public listClientTlsPolicies(request: google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest): Promise; + + /** + * Calls GetClientTlsPolicy. + * @param request GetClientTlsPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ClientTlsPolicy + */ + public getClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest, callback: google.cloud.networksecurity.v1alpha1.NetworkSecurity.GetClientTlsPolicyCallback): void; + + /** + * Calls GetClientTlsPolicy. + * @param request GetClientTlsPolicyRequest message or plain object + * @returns Promise + */ + public getClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest): Promise; + + /** + * Calls CreateClientTlsPolicy. + * @param request CreateClientTlsPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest, callback: google.cloud.networksecurity.v1alpha1.NetworkSecurity.CreateClientTlsPolicyCallback): void; + + /** + * Calls CreateClientTlsPolicy. + * @param request CreateClientTlsPolicyRequest message or plain object + * @returns Promise + */ + public createClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest): Promise; + + /** + * Calls UpdateClientTlsPolicy. + * @param request UpdateClientTlsPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest, callback: google.cloud.networksecurity.v1alpha1.NetworkSecurity.UpdateClientTlsPolicyCallback): void; + + /** + * Calls UpdateClientTlsPolicy. + * @param request UpdateClientTlsPolicyRequest message or plain object + * @returns Promise + */ + public updateClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest): Promise; + + /** + * Calls DeleteClientTlsPolicy. + * @param request DeleteClientTlsPolicyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest, callback: google.cloud.networksecurity.v1alpha1.NetworkSecurity.DeleteClientTlsPolicyCallback): void; + + /** + * Calls DeleteClientTlsPolicy. + * @param request DeleteClientTlsPolicyRequest message or plain object + * @returns Promise + */ + public deleteClientTlsPolicy(request: google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest): Promise; + } + + namespace NetworkSecurity { + + /** + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|listClientTlsPolicies}. + * @param error Error, if any + * @param [response] ListClientTlsPoliciesResponse + */ + type ListClientTlsPoliciesCallback = (error: (Error|null), response?: google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse) => void; + + /** + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|getClientTlsPolicy}. + * @param error Error, if any + * @param [response] ClientTlsPolicy + */ + type GetClientTlsPolicyCallback = (error: (Error|null), response?: google.cloud.networksecurity.v1alpha1.ClientTlsPolicy) => void; + + /** + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|createClientTlsPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateClientTlsPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|updateClientTlsPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateClientTlsPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|deleteClientTlsPolicy}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteClientTlsPolicyCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + } + /** Namespace v1beta1. */ namespace v1beta1 { @@ -8041,6 +9588,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -8058,6 +9608,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -8758,6 +10311,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -8772,6 +10328,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -8828,26 +10387,138 @@ export namespace google { */ 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 }; + /** + * 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; + } + + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ExperimentalFeatures 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; + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of a NodeSettings. */ @@ -9176,6 +10847,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -9190,6 +10864,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -9514,6 +11191,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -9630,6 +11410,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -9660,6 +11441,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -9709,6 +11493,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -9843,6 +11630,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -9884,6 +11674,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -10731,6 +12524,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -10757,6 +12553,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -11691,6 +13490,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -11746,6 +13548,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -11966,6 +13771,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -12204,6 +14124,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -12226,6 +14149,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -12818,6 +14744,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -12847,6 +14779,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -12969,6 +14907,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -13088,8 +15136,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -13104,8 +15155,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -13638,6 +15692,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a FieldMask. */ interface IFieldMask { diff --git a/packages/google-cloud-networksecurity/protos/protos.js b/packages/google-cloud-networksecurity/protos/protos.js index 065ebba78910..45a86bd783ae 100644 --- a/packages/google-cloud-networksecurity/protos/protos.js +++ b/packages/google-cloud-networksecurity/protos/protos.js @@ -8772,41 +8772,42 @@ return v1; })(); - networksecurity.v1beta1 = (function() { + networksecurity.v1alpha1 = (function() { /** - * Namespace v1beta1. + * Namespace v1alpha1. * @memberof google.cloud.networksecurity * @namespace */ - var v1beta1 = {}; + var v1alpha1 = {}; - v1beta1.AuthorizationPolicy = (function() { + v1alpha1.ClientTlsPolicy = (function() { /** - * Properties of an AuthorizationPolicy. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IAuthorizationPolicy - * @property {string|null} [name] AuthorizationPolicy name - * @property {string|null} [description] AuthorizationPolicy description - * @property {google.protobuf.ITimestamp|null} [createTime] AuthorizationPolicy createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] AuthorizationPolicy updateTime - * @property {Object.|null} [labels] AuthorizationPolicy labels - * @property {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action|null} [action] AuthorizationPolicy action - * @property {Array.|null} [rules] AuthorizationPolicy rules + * Properties of a ClientTlsPolicy. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IClientTlsPolicy + * @property {string|null} [name] ClientTlsPolicy name + * @property {string|null} [description] ClientTlsPolicy description + * @property {google.protobuf.ITimestamp|null} [createTime] ClientTlsPolicy createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ClientTlsPolicy updateTime + * @property {Object.|null} [labels] ClientTlsPolicy labels + * @property {string|null} [sni] ClientTlsPolicy sni + * @property {google.cloud.networksecurity.v1alpha1.ICertificateProvider|null} [clientCertificate] ClientTlsPolicy clientCertificate + * @property {Array.|null} [serverValidationCa] ClientTlsPolicy serverValidationCa */ /** - * Constructs a new AuthorizationPolicy. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents an AuthorizationPolicy. - * @implements IAuthorizationPolicy + * Constructs a new ClientTlsPolicy. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a ClientTlsPolicy. + * @implements IClientTlsPolicy * @constructor - * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy=} [properties] Properties to set */ - function AuthorizationPolicy(properties) { + function ClientTlsPolicy(properties) { this.labels = {}; - this.rules = []; + this.serverValidationCa = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8814,83 +8815,91 @@ } /** - * AuthorizationPolicy name. + * ClientTlsPolicy name. * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance */ - AuthorizationPolicy.prototype.name = ""; + ClientTlsPolicy.prototype.name = ""; /** - * AuthorizationPolicy description. + * ClientTlsPolicy description. * @member {string} description - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance */ - AuthorizationPolicy.prototype.description = ""; + ClientTlsPolicy.prototype.description = ""; /** - * AuthorizationPolicy createTime. + * ClientTlsPolicy createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance */ - AuthorizationPolicy.prototype.createTime = null; + ClientTlsPolicy.prototype.createTime = null; /** - * AuthorizationPolicy updateTime. + * ClientTlsPolicy updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance */ - AuthorizationPolicy.prototype.updateTime = null; + ClientTlsPolicy.prototype.updateTime = null; /** - * AuthorizationPolicy labels. + * ClientTlsPolicy labels. * @member {Object.} labels - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance */ - AuthorizationPolicy.prototype.labels = $util.emptyObject; + ClientTlsPolicy.prototype.labels = $util.emptyObject; /** - * AuthorizationPolicy action. - * @member {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action} action - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * ClientTlsPolicy sni. + * @member {string} sni + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance */ - AuthorizationPolicy.prototype.action = 0; + ClientTlsPolicy.prototype.sni = ""; /** - * AuthorizationPolicy rules. - * @member {Array.} rules - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * ClientTlsPolicy clientCertificate. + * @member {google.cloud.networksecurity.v1alpha1.ICertificateProvider|null|undefined} clientCertificate + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance */ - AuthorizationPolicy.prototype.rules = $util.emptyArray; + ClientTlsPolicy.prototype.clientCertificate = null; /** - * Creates a new AuthorizationPolicy instance using the specified properties. + * ClientTlsPolicy serverValidationCa. + * @member {Array.} serverValidationCa + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy + * @instance + */ + ClientTlsPolicy.prototype.serverValidationCa = $util.emptyArray; + + /** + * Creates a new ClientTlsPolicy instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy instance + * @param {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} ClientTlsPolicy instance */ - AuthorizationPolicy.create = function create(properties) { - return new AuthorizationPolicy(properties); + ClientTlsPolicy.create = function create(properties) { + return new ClientTlsPolicy(properties); }; /** - * Encodes the specified AuthorizationPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify|verify} messages. + * Encodes the specified ClientTlsPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy} message AuthorizationPolicy message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy} message ClientTlsPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthorizationPolicy.encode = function encode(message, writer) { + ClientTlsPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -8904,42 +8913,44 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.action != null && Object.hasOwnProperty.call(message, "action")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.action); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.encode(message.rules[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.sni != null && Object.hasOwnProperty.call(message, "sni")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sni); + if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) + $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.encode(message.clientCertificate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serverValidationCa != null && message.serverValidationCa.length) + for (var i = 0; i < message.serverValidationCa.length; ++i) + $root.google.cloud.networksecurity.v1alpha1.ValidationCA.encode(message.serverValidationCa[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified AuthorizationPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify|verify} messages. + * Encodes the specified ClientTlsPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy} message AuthorizationPolicy message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy} message ClientTlsPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthorizationPolicy.encodeDelimited = function encodeDelimited(message, writer) { + ClientTlsPolicy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AuthorizationPolicy message from the specified reader or buffer. + * Decodes a ClientTlsPolicy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy + * @returns {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} ClientTlsPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthorizationPolicy.decode = function decode(reader, length, error) { + ClientTlsPolicy.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -8985,13 +8996,17 @@ break; } case 6: { - message.action = reader.int32(); + message.sni = reader.string(); break; } case 7: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.decode(reader, reader.uint32())); + message.clientCertificate = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.serverValidationCa && message.serverValidationCa.length)) + message.serverValidationCa = []; + message.serverValidationCa.push($root.google.cloud.networksecurity.v1alpha1.ValidationCA.decode(reader, reader.uint32())); break; } default: @@ -9003,30 +9018,30 @@ }; /** - * Decodes an AuthorizationPolicy message from the specified reader or buffer, length delimited. + * Decodes a ClientTlsPolicy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy + * @returns {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} ClientTlsPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthorizationPolicy.decodeDelimited = function decodeDelimited(reader) { + ClientTlsPolicy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AuthorizationPolicy message. + * Verifies a ClientTlsPolicy message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AuthorizationPolicy.verify = function verify(message) { + ClientTlsPolicy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -9053,108 +9068,94 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } - if (message.action != null && message.hasOwnProperty("action")) - switch (message.action) { - default: - return "action: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.verify(message.rules[i]); + if (message.sni != null && message.hasOwnProperty("sni")) + if (!$util.isString(message.sni)) + return "sni: string expected"; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) { + var error = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.verify(message.clientCertificate); + if (error) + return "clientCertificate." + error; + } + if (message.serverValidationCa != null && message.hasOwnProperty("serverValidationCa")) { + if (!Array.isArray(message.serverValidationCa)) + return "serverValidationCa: array expected"; + for (var i = 0; i < message.serverValidationCa.length; ++i) { + var error = $root.google.cloud.networksecurity.v1alpha1.ValidationCA.verify(message.serverValidationCa[i]); if (error) - return "rules." + error; + return "serverValidationCa." + error; } } return null; }; /** - * Creates an AuthorizationPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a ClientTlsPolicy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy + * @returns {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} ClientTlsPolicy */ - AuthorizationPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy) + ClientTlsPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy(); + var message = new $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy(); if (object.name != null) message.name = String(object.name); if (object.description != null) message.description = String(object.description); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.createTime: object expected"); + throw TypeError(".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.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.networksecurity.v1beta1.AuthorizationPolicy.updateTime: object expected"); + throw TypeError(".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.labels: object expected"); + throw TypeError(".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.labels: object expected"); message.labels = {}; for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); } - switch (object.action) { - default: - if (typeof object.action === "number") { - message.action = object.action; - break; - } - break; - case "ACTION_UNSPECIFIED": - case 0: - message.action = 0; - break; - case "ALLOW": - case 1: - message.action = 1; - break; - case "DENY": - case 2: - message.action = 2; - break; + if (object.sni != null) + message.sni = String(object.sni); + if (object.clientCertificate != null) { + if (typeof object.clientCertificate !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.clientCertificate: object expected"); + message.clientCertificate = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.fromObject(object.clientCertificate); } - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.rules: object expected"); - message.rules[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.fromObject(object.rules[i]); + if (object.serverValidationCa) { + if (!Array.isArray(object.serverValidationCa)) + throw TypeError(".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.serverValidationCa: array expected"); + message.serverValidationCa = []; + for (var i = 0; i < object.serverValidationCa.length; ++i) { + if (typeof object.serverValidationCa[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.serverValidationCa: object expected"); + message.serverValidationCa[i] = $root.google.cloud.networksecurity.v1alpha1.ValidationCA.fromObject(object.serverValidationCa[i]); } } return message; }; /** - * Creates a plain object from an AuthorizationPolicy message. Also converts values to other types if specified. + * Creates a plain object from a ClientTlsPolicy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} message AuthorizationPolicy + * @param {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} message ClientTlsPolicy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AuthorizationPolicy.toObject = function toObject(message, options) { + ClientTlsPolicy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; + object.serverValidationCa = []; if (options.objects || options.defaults) object.labels = {}; if (options.defaults) { @@ -9162,7 +9163,8 @@ object.description = ""; object.createTime = null; object.updateTime = null; - object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + object.sni = ""; + object.clientCertificate = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -9178,1288 +9180,865 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.action != null && message.hasOwnProperty("action")) - object.action = options.enums === String ? $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action[message.action] === undefined ? message.action : $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action[message.action] : message.action; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.toObject(message.rules[j], options); + if (message.sni != null && message.hasOwnProperty("sni")) + object.sni = message.sni; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + object.clientCertificate = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.toObject(message.clientCertificate, options); + if (message.serverValidationCa && message.serverValidationCa.length) { + object.serverValidationCa = []; + for (var j = 0; j < message.serverValidationCa.length; ++j) + object.serverValidationCa[j] = $root.google.cloud.networksecurity.v1alpha1.ValidationCA.toObject(message.serverValidationCa[j], options); } return object; }; /** - * Converts this AuthorizationPolicy to JSON. + * Converts this ClientTlsPolicy to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @instance * @returns {Object.} JSON object */ - AuthorizationPolicy.prototype.toJSON = function toJSON() { + ClientTlsPolicy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AuthorizationPolicy + * Gets the default type url for ClientTlsPolicy * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @memberof google.cloud.networksecurity.v1alpha1.ClientTlsPolicy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AuthorizationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClientTlsPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.ClientTlsPolicy"; }; - AuthorizationPolicy.Rule = (function() { + return ClientTlsPolicy; + })(); - /** - * Properties of a Rule. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy - * @interface IRule - * @property {Array.|null} [sources] Rule sources - * @property {Array.|null} [destinations] Rule destinations - */ + v1alpha1.ListClientTlsPoliciesRequest = (function() { - /** - * Constructs a new Rule. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy - * @classdesc Represents a Rule. - * @implements IRule - * @constructor - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule=} [properties] Properties to set - */ - function Rule(properties) { - this.sources = []; - 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]]; - } + /** + * Properties of a ListClientTlsPoliciesRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IListClientTlsPoliciesRequest + * @property {string|null} [parent] ListClientTlsPoliciesRequest parent + * @property {number|null} [pageSize] ListClientTlsPoliciesRequest pageSize + * @property {string|null} [pageToken] ListClientTlsPoliciesRequest pageToken + */ - /** - * Rule sources. - * @member {Array.} sources - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @instance - */ - Rule.prototype.sources = $util.emptyArray; + /** + * Constructs a new ListClientTlsPoliciesRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a ListClientTlsPoliciesRequest. + * @implements IListClientTlsPoliciesRequest + * @constructor + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest=} [properties] Properties to set + */ + function ListClientTlsPoliciesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Rule destinations. - * @member {Array.} destinations - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @instance - */ - Rule.prototype.destinations = $util.emptyArray; + /** + * ListClientTlsPoliciesRequest parent. + * @member {string} parent + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @instance + */ + ListClientTlsPoliciesRequest.prototype.parent = ""; - /** - * Creates a new Rule instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule instance - */ - Rule.create = function create(properties) { - return new Rule(properties); - }; + /** + * ListClientTlsPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @instance + */ + ListClientTlsPoliciesRequest.prototype.pageSize = 0; - /** - * Encodes the specified Rule message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sources != null && message.sources.length) - for (var i = 0; i < message.sources.length; ++i) - $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.destinations != null && message.destinations.length) - for (var i = 0; i < message.destinations.length; ++i) - $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.encode(message.destinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * ListClientTlsPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @instance + */ + ListClientTlsPoliciesRequest.prototype.pageToken = ""; - /** - * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule} message Rule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Rule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new ListClientTlsPoliciesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest instance + */ + ListClientTlsPoliciesRequest.create = function create(properties) { + return new ListClientTlsPoliciesRequest(properties); + }; - /** - * Decodes a Rule message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.sources && message.sources.length)) - message.sources = []; - message.sources.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - message.destinations.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Encodes the specified ListClientTlsPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClientTlsPoliciesRequest.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; + }; - /** - * Decodes a Rule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Rule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListClientTlsPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClientTlsPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Verifies a Rule message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Rule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sources != null && message.hasOwnProperty("sources")) { - if (!Array.isArray(message.sources)) - return "sources: array expected"; - for (var i = 0; i < message.sources.length; ++i) { - var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.verify(message.sources[i]); - if (error) - return "sources." + error; + /** + * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClientTlsPoliciesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; } - } - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) { - var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.verify(message.destinations[i]); - if (error) - return "destinations." + error; + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; } + default: + reader.skipType(tag & 7); + break; } - return null; - }; + } + return message; + }; - /** - * Creates a Rule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule - */ - Rule.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule(); - if (object.sources) { - if (!Array.isArray(object.sources)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.sources: array expected"); - message.sources = []; - for (var i = 0; i < object.sources.length; ++i) { - if (typeof object.sources[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.sources: object expected"); - message.sources[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.fromObject(object.sources[i]); - } - } - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) { - if (typeof object.destinations[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.destinations: object expected"); - message.destinations[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.fromObject(object.destinations[i]); - } - } - return message; - }; + /** + * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClientTlsPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a Rule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} message Rule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Rule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.sources = []; - object.destinations = []; - } - if (message.sources && message.sources.length) { - object.sources = []; - for (var j = 0; j < message.sources.length; ++j) - object.sources[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.toObject(message.sources[j], options); - } - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.toObject(message.destinations[j], options); - } + /** + * Verifies a ListClientTlsPoliciesRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClientTlsPoliciesRequest.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 ListClientTlsPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest + */ + ListClientTlsPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest) return object; - }; + var message = new $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest(); + 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; + }; - /** - * Converts this Rule to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @instance - * @returns {Object.} JSON object - */ - Rule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ListClientTlsPoliciesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClientTlsPoliciesRequest.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; + }; - /** - * Gets the default type url for Rule - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Rule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule"; - }; + /** + * Converts this ListClientTlsPoliciesRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @instance + * @returns {Object.} JSON object + */ + ListClientTlsPoliciesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - Rule.Source = (function() { + /** + * Gets the default type url for ListClientTlsPoliciesRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClientTlsPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest"; + }; - /** - * Properties of a Source. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @interface ISource - * @property {Array.|null} [principals] Source principals - * @property {Array.|null} [ipBlocks] Source ipBlocks - */ + return ListClientTlsPoliciesRequest; + })(); - /** - * Constructs a new Source. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @classdesc Represents a Source. - * @implements ISource - * @constructor - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource=} [properties] Properties to set - */ - function Source(properties) { - this.principals = []; - this.ipBlocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1alpha1.ListClientTlsPoliciesResponse = (function() { - /** - * Source principals. - * @member {Array.} principals - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @instance - */ - Source.prototype.principals = $util.emptyArray; + /** + * Properties of a ListClientTlsPoliciesResponse. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IListClientTlsPoliciesResponse + * @property {Array.|null} [clientTlsPolicies] ListClientTlsPoliciesResponse clientTlsPolicies + * @property {string|null} [nextPageToken] ListClientTlsPoliciesResponse nextPageToken + */ - /** - * Source ipBlocks. - * @member {Array.} ipBlocks - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @instance - */ - Source.prototype.ipBlocks = $util.emptyArray; + /** + * Constructs a new ListClientTlsPoliciesResponse. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a ListClientTlsPoliciesResponse. + * @implements IListClientTlsPoliciesResponse + * @constructor + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse=} [properties] Properties to set + */ + function ListClientTlsPoliciesResponse(properties) { + this.clientTlsPolicies = []; + if (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 Source instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source instance - */ - Source.create = function create(properties) { - return new Source(properties); - }; + /** + * ListClientTlsPoliciesResponse clientTlsPolicies. + * @member {Array.} clientTlsPolicies + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @instance + */ + ListClientTlsPoliciesResponse.prototype.clientTlsPolicies = $util.emptyArray; - /** - * Encodes the specified Source message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource} message Source message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Source.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.principals != null && message.principals.length) - for (var i = 0; i < message.principals.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.principals[i]); - if (message.ipBlocks != null && message.ipBlocks.length) - for (var i = 0; i < message.ipBlocks.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ipBlocks[i]); - return writer; - }; - - /** - * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource} message Source message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Source.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListClientTlsPoliciesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @instance + */ + ListClientTlsPoliciesResponse.prototype.nextPageToken = ""; - /** - * Decodes a Source message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Source.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.principals && message.principals.length)) - message.principals = []; - message.principals.push(reader.string()); - break; - } - case 2: { - if (!(message.ipBlocks && message.ipBlocks.length)) - message.ipBlocks = []; - message.ipBlocks.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a new ListClientTlsPoliciesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse instance + */ + ListClientTlsPoliciesResponse.create = function create(properties) { + return new ListClientTlsPoliciesResponse(properties); + }; - /** - * Decodes a Source message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Source.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Encodes the specified ListClientTlsPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClientTlsPoliciesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientTlsPolicies != null && message.clientTlsPolicies.length) + for (var i = 0; i < message.clientTlsPolicies.length; ++i) + $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.encode(message.clientTlsPolicies[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; + }; - /** - * Verifies a Source message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Source.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.principals != null && message.hasOwnProperty("principals")) { - if (!Array.isArray(message.principals)) - return "principals: array expected"; - for (var i = 0; i < message.principals.length; ++i) - if (!$util.isString(message.principals[i])) - return "principals: string[] expected"; - } - if (message.ipBlocks != null && message.hasOwnProperty("ipBlocks")) { - if (!Array.isArray(message.ipBlocks)) - return "ipBlocks: array expected"; - for (var i = 0; i < message.ipBlocks.length; ++i) - if (!$util.isString(message.ipBlocks[i])) - return "ipBlocks: string[] expected"; - } - return null; - }; + /** + * Encodes the specified ListClientTlsPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListClientTlsPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a Source message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source - */ - Source.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source(); - if (object.principals) { - if (!Array.isArray(object.principals)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.principals: array expected"); - message.principals = []; - for (var i = 0; i < object.principals.length; ++i) - message.principals[i] = String(object.principals[i]); + /** + * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClientTlsPoliciesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.clientTlsPolicies && message.clientTlsPolicies.length)) + message.clientTlsPolicies = []; + message.clientTlsPolicies.push($root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.decode(reader, reader.uint32())); + break; } - if (object.ipBlocks) { - if (!Array.isArray(object.ipBlocks)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.ipBlocks: array expected"); - message.ipBlocks = []; - for (var i = 0; i < object.ipBlocks.length; ++i) - message.ipBlocks[i] = String(object.ipBlocks[i]); + case 2: { + message.nextPageToken = reader.string(); + break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Creates a plain object from a Source message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} message Source - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Source.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.principals = []; - object.ipBlocks = []; - } - if (message.principals && message.principals.length) { - object.principals = []; - for (var j = 0; j < message.principals.length; ++j) - object.principals[j] = message.principals[j]; - } - if (message.ipBlocks && message.ipBlocks.length) { - object.ipBlocks = []; - for (var j = 0; j < message.ipBlocks.length; ++j) - object.ipBlocks[j] = message.ipBlocks[j]; - } - return object; - }; + /** + * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListClientTlsPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Converts this Source to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @instance - * @returns {Object.} JSON object - */ - Source.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Verifies a ListClientTlsPoliciesResponse message. + * @function verify + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListClientTlsPoliciesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientTlsPolicies != null && message.hasOwnProperty("clientTlsPolicies")) { + if (!Array.isArray(message.clientTlsPolicies)) + return "clientTlsPolicies: array expected"; + for (var i = 0; i < message.clientTlsPolicies.length; ++i) { + var error = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.verify(message.clientTlsPolicies[i]); + if (error) + return "clientTlsPolicies." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; - /** - * Gets the default type url for Source - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Source.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source"; - }; + /** + * Creates a ListClientTlsPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse + */ + ListClientTlsPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse) + return object; + var message = new $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse(); + if (object.clientTlsPolicies) { + if (!Array.isArray(object.clientTlsPolicies)) + throw TypeError(".google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse.clientTlsPolicies: array expected"); + message.clientTlsPolicies = []; + for (var i = 0; i < object.clientTlsPolicies.length; ++i) { + if (typeof object.clientTlsPolicies[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse.clientTlsPolicies: object expected"); + message.clientTlsPolicies[i] = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.fromObject(object.clientTlsPolicies[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - return Source; - })(); + /** + * Creates a plain object from a ListClientTlsPoliciesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListClientTlsPoliciesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.clientTlsPolicies = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.clientTlsPolicies && message.clientTlsPolicies.length) { + object.clientTlsPolicies = []; + for (var j = 0; j < message.clientTlsPolicies.length; ++j) + object.clientTlsPolicies[j] = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.toObject(message.clientTlsPolicies[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - Rule.Destination = (function() { + /** + * Converts this ListClientTlsPoliciesResponse to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @instance + * @returns {Object.} JSON object + */ + ListClientTlsPoliciesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a Destination. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @interface IDestination - * @property {Array.|null} [hosts] Destination hosts - * @property {Array.|null} [ports] Destination ports - * @property {Array.|null} [methods] Destination methods - * @property {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch|null} [httpHeaderMatch] Destination httpHeaderMatch - */ + /** + * Gets the default type url for ListClientTlsPoliciesResponse + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListClientTlsPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse"; + }; - /** - * Constructs a new Destination. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule - * @classdesc Represents a Destination. - * @implements IDestination - * @constructor - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination=} [properties] Properties to set - */ - function Destination(properties) { - this.hosts = []; - this.ports = []; - this.methods = []; - if (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 ListClientTlsPoliciesResponse; + })(); - /** - * Destination hosts. - * @member {Array.} hosts - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @instance - */ - Destination.prototype.hosts = $util.emptyArray; + v1alpha1.GetClientTlsPolicyRequest = (function() { - /** - * Destination ports. - * @member {Array.} ports - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @instance - */ - Destination.prototype.ports = $util.emptyArray; + /** + * Properties of a GetClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IGetClientTlsPolicyRequest + * @property {string|null} [name] GetClientTlsPolicyRequest name + */ - /** - * Destination methods. - * @member {Array.} methods - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @instance - */ - Destination.prototype.methods = $util.emptyArray; + /** + * Constructs a new GetClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a GetClientTlsPolicyRequest. + * @implements IGetClientTlsPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest=} [properties] Properties to set + */ + function GetClientTlsPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Destination httpHeaderMatch. - * @member {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch|null|undefined} httpHeaderMatch - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @instance - */ - Destination.prototype.httpHeaderMatch = null; + /** + * GetClientTlsPolicyRequest name. + * @member {string} name + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @instance + */ + GetClientTlsPolicyRequest.prototype.name = ""; - /** - * Creates a new Destination instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination instance - */ - Destination.create = function create(properties) { - return new Destination(properties); - }; + /** + * Creates a new GetClientTlsPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest instance + */ + GetClientTlsPolicyRequest.create = function create(properties) { + return new GetClientTlsPolicyRequest(properties); + }; - /** - * Encodes the specified Destination message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination} message Destination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Destination.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hosts != null && message.hosts.length) - for (var i = 0; i < message.hosts.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.hosts[i]); - if (message.ports != null && message.ports.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.ports.length; ++i) - writer.uint32(message.ports[i]); - writer.ldelim(); - } - if (message.methods != null && message.methods.length) - for (var i = 0; i < message.methods.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.methods[i]); - if (message.httpHeaderMatch != null && Object.hasOwnProperty.call(message, "httpHeaderMatch")) - $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.encode(message.httpHeaderMatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified GetClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest} message GetClientTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClientTlsPolicyRequest.encode = function encode(message, writer) { + 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 Destination message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination} message Destination message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Destination.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified GetClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest} message GetClientTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a Destination message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Destination.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.hosts && message.hosts.length)) - message.hosts = []; - message.hosts.push(reader.string()); - break; - } - case 2: { - if (!(message.ports && message.ports.length)) - message.ports = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.ports.push(reader.uint32()); - } else - message.ports.push(reader.uint32()); - break; - } - case 4: { - if (!(message.methods && message.methods.length)) - message.methods = []; - message.methods.push(reader.string()); - break; - } - case 5: { - message.httpHeaderMatch = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } + /** + * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClientTlsPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; } - return message; - }; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Decodes a Destination message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Destination.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Destination message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Destination.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hosts != null && message.hasOwnProperty("hosts")) { - if (!Array.isArray(message.hosts)) - return "hosts: array expected"; - for (var i = 0; i < message.hosts.length; ++i) - if (!$util.isString(message.hosts[i])) - return "hosts: string[] expected"; - } - if (message.ports != null && message.hasOwnProperty("ports")) { - if (!Array.isArray(message.ports)) - return "ports: array expected"; - for (var i = 0; i < message.ports.length; ++i) - if (!$util.isInteger(message.ports[i])) - return "ports: integer[] expected"; - } - if (message.methods != null && message.hasOwnProperty("methods")) { - if (!Array.isArray(message.methods)) - return "methods: array expected"; - for (var i = 0; i < message.methods.length; ++i) - if (!$util.isString(message.methods[i])) - return "methods: string[] expected"; - } - if (message.httpHeaderMatch != null && message.hasOwnProperty("httpHeaderMatch")) { - var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.verify(message.httpHeaderMatch); - if (error) - return "httpHeaderMatch." + error; - } - return null; - }; + /** + * Verifies a GetClientTlsPolicyRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetClientTlsPolicyRequest.verify = function verify(message) { + if (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 Destination message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination - */ - Destination.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination(); - if (object.hosts) { - if (!Array.isArray(object.hosts)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.hosts: array expected"); - message.hosts = []; - for (var i = 0; i < object.hosts.length; ++i) - message.hosts[i] = String(object.hosts[i]); - } - if (object.ports) { - if (!Array.isArray(object.ports)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.ports: array expected"); - message.ports = []; - for (var i = 0; i < object.ports.length; ++i) - message.ports[i] = object.ports[i] >>> 0; - } - if (object.methods) { - if (!Array.isArray(object.methods)) - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.methods: array expected"); - message.methods = []; - for (var i = 0; i < object.methods.length; ++i) - message.methods[i] = String(object.methods[i]); - } - if (object.httpHeaderMatch != null) { - if (typeof object.httpHeaderMatch !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.httpHeaderMatch: object expected"); - message.httpHeaderMatch = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.fromObject(object.httpHeaderMatch); - } - return message; - }; + /** + * Creates a GetClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest + */ + GetClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a plain object from a Destination message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} message Destination - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Destination.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.hosts = []; - object.ports = []; - object.methods = []; - } - if (options.defaults) - object.httpHeaderMatch = null; - if (message.hosts && message.hosts.length) { - object.hosts = []; - for (var j = 0; j < message.hosts.length; ++j) - object.hosts[j] = message.hosts[j]; - } - if (message.ports && message.ports.length) { - object.ports = []; - for (var j = 0; j < message.ports.length; ++j) - object.ports[j] = message.ports[j]; - } - if (message.methods && message.methods.length) { - object.methods = []; - for (var j = 0; j < message.methods.length; ++j) - object.methods[j] = message.methods[j]; - } - if (message.httpHeaderMatch != null && message.hasOwnProperty("httpHeaderMatch")) - object.httpHeaderMatch = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.toObject(message.httpHeaderMatch, options); - return object; - }; + /** + * Creates a plain object from a GetClientTlsPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest} message GetClientTlsPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetClientTlsPolicyRequest.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 Destination to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @instance - * @returns {Object.} JSON object - */ - Destination.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this GetClientTlsPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetClientTlsPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Destination - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination"; - }; + /** + * Gets the default type url for GetClientTlsPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest"; + }; - Destination.HttpHeaderMatch = (function() { + return GetClientTlsPolicyRequest; + })(); - /** - * Properties of a HttpHeaderMatch. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @interface IHttpHeaderMatch - * @property {string|null} [regexMatch] HttpHeaderMatch regexMatch - * @property {string|null} [headerName] HttpHeaderMatch headerName - */ + v1alpha1.CreateClientTlsPolicyRequest = (function() { - /** - * Constructs a new HttpHeaderMatch. - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination - * @classdesc Represents a HttpHeaderMatch. - * @implements IHttpHeaderMatch - * @constructor - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch=} [properties] Properties to set - */ - function HttpHeaderMatch(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a CreateClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface ICreateClientTlsPolicyRequest + * @property {string|null} [parent] CreateClientTlsPolicyRequest parent + * @property {string|null} [clientTlsPolicyId] CreateClientTlsPolicyRequest clientTlsPolicyId + * @property {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null} [clientTlsPolicy] CreateClientTlsPolicyRequest clientTlsPolicy + */ - /** - * HttpHeaderMatch regexMatch. - * @member {string|null|undefined} regexMatch - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @instance - */ - HttpHeaderMatch.prototype.regexMatch = null; + /** + * Constructs a new CreateClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a CreateClientTlsPolicyRequest. + * @implements ICreateClientTlsPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest=} [properties] Properties to set + */ + function CreateClientTlsPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * HttpHeaderMatch headerName. - * @member {string} headerName - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @instance - */ - HttpHeaderMatch.prototype.headerName = ""; + /** + * CreateClientTlsPolicyRequest parent. + * @member {string} parent + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest + * @instance + */ + CreateClientTlsPolicyRequest.prototype.parent = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * CreateClientTlsPolicyRequest clientTlsPolicyId. + * @member {string} clientTlsPolicyId + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest + * @instance + */ + CreateClientTlsPolicyRequest.prototype.clientTlsPolicyId = ""; - /** - * HttpHeaderMatch type. - * @member {"regexMatch"|undefined} type - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @instance - */ - Object.defineProperty(HttpHeaderMatch.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["regexMatch"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * CreateClientTlsPolicyRequest clientTlsPolicy. + * @member {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null|undefined} clientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest + * @instance + */ + CreateClientTlsPolicyRequest.prototype.clientTlsPolicy = null; - /** - * Creates a new HttpHeaderMatch instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch instance - */ - HttpHeaderMatch.create = function create(properties) { - return new HttpHeaderMatch(properties); - }; + /** + * Creates a new CreateClientTlsPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest instance + */ + CreateClientTlsPolicyRequest.create = function create(properties) { + return new CreateClientTlsPolicyRequest(properties); + }; - /** - * Encodes the specified HttpHeaderMatch message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch} message HttpHeaderMatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpHeaderMatch.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.headerName != null && Object.hasOwnProperty.call(message, "headerName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.headerName); - if (message.regexMatch != null && Object.hasOwnProperty.call(message, "regexMatch")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.regexMatch); - return writer; - }; + /** + * Encodes the specified CreateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClientTlsPolicyRequest.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.clientTlsPolicyId != null && Object.hasOwnProperty.call(message, "clientTlsPolicyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientTlsPolicyId); + if (message.clientTlsPolicy != null && Object.hasOwnProperty.call(message, "clientTlsPolicy")) + $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.encode(message.clientTlsPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified HttpHeaderMatch message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch} message HttpHeaderMatch message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpHeaderMatch.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpHeaderMatch message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpHeaderMatch.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.regexMatch = reader.string(); - break; - } - case 1: { - message.headerName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpHeaderMatch message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpHeaderMatch.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpHeaderMatch message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpHeaderMatch.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.regexMatch != null && message.hasOwnProperty("regexMatch")) { - properties.type = 1; - if (!$util.isString(message.regexMatch)) - return "regexMatch: string expected"; - } - if (message.headerName != null && message.hasOwnProperty("headerName")) - if (!$util.isString(message.headerName)) - return "headerName: string expected"; - return null; - }; - - /** - * Creates a HttpHeaderMatch message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch - */ - HttpHeaderMatch.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch(); - if (object.regexMatch != null) - message.regexMatch = String(object.regexMatch); - if (object.headerName != null) - message.headerName = String(object.headerName); - return message; - }; - - /** - * Creates a plain object from a HttpHeaderMatch message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} message HttpHeaderMatch - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpHeaderMatch.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.headerName = ""; - if (message.headerName != null && message.hasOwnProperty("headerName")) - object.headerName = message.headerName; - if (message.regexMatch != null && message.hasOwnProperty("regexMatch")) { - object.regexMatch = message.regexMatch; - if (options.oneofs) - object.type = "regexMatch"; - } - return object; - }; - - /** - * Converts this HttpHeaderMatch to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @instance - * @returns {Object.} JSON object - */ - HttpHeaderMatch.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpHeaderMatch - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpHeaderMatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch"; - }; - - return HttpHeaderMatch; - })(); - - return Destination; - })(); - - return Rule; - })(); - - /** - * Action enum. - * @name google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action - * @enum {number} - * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value - * @property {number} ALLOW=1 ALLOW value - * @property {number} DENY=2 DENY value - */ - AuthorizationPolicy.Action = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "DENY"] = 2; - return values; - })(); - - return AuthorizationPolicy; - })(); - - v1beta1.ListAuthorizationPoliciesRequest = (function() { - - /** - * Properties of a ListAuthorizationPoliciesRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IListAuthorizationPoliciesRequest - * @property {string|null} [parent] ListAuthorizationPoliciesRequest parent - * @property {number|null} [pageSize] ListAuthorizationPoliciesRequest pageSize - * @property {string|null} [pageToken] ListAuthorizationPoliciesRequest pageToken - */ - - /** - * Constructs a new ListAuthorizationPoliciesRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ListAuthorizationPoliciesRequest. - * @implements IListAuthorizationPoliciesRequest - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest=} [properties] Properties to set - */ - function ListAuthorizationPoliciesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListAuthorizationPoliciesRequest parent. - * @member {string} parent - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest - * @instance - */ - ListAuthorizationPoliciesRequest.prototype.parent = ""; - - /** - * ListAuthorizationPoliciesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest - * @instance - */ - ListAuthorizationPoliciesRequest.prototype.pageSize = 0; - - /** - * ListAuthorizationPoliciesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest - * @instance - */ - ListAuthorizationPoliciesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListAuthorizationPoliciesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest instance - */ - ListAuthorizationPoliciesRequest.create = function create(properties) { - return new ListAuthorizationPoliciesRequest(properties); - }; - - /** - * Encodes the specified ListAuthorizationPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} message ListAuthorizationPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAuthorizationPoliciesRequest.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 ListAuthorizationPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} message ListAuthorizationPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListAuthorizationPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified CreateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Decodes a ListAuthorizationPoliciesRequest message from the specified reader or buffer. + * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest + * @returns {google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAuthorizationPoliciesRequest.decode = function decode(reader, length, error) { + CreateClientTlsPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -10470,11 +10049,11 @@ break; } case 2: { - message.pageSize = reader.int32(); + message.clientTlsPolicyId = reader.string(); break; } case 3: { - message.pageToken = reader.string(); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.decode(reader, reader.uint32()); break; } default: @@ -10486,141 +10065,145 @@ }; /** - * Decodes a ListAuthorizationPoliciesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest + * @returns {google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAuthorizationPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAuthorizationPoliciesRequest message. + * Verifies a CreateClientTlsPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAuthorizationPoliciesRequest.verify = function verify(message) { + CreateClientTlsPolicyRequest.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.clientTlsPolicyId != null && message.hasOwnProperty("clientTlsPolicyId")) + if (!$util.isString(message.clientTlsPolicyId)) + return "clientTlsPolicyId: string expected"; + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) { + var error = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.verify(message.clientTlsPolicy); + if (error) + return "clientTlsPolicy." + error; + } return null; }; /** - * Creates a ListAuthorizationPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest + * @returns {google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest */ - ListAuthorizationPoliciesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest) + CreateClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest(); + var message = new $root.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest(); 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.clientTlsPolicyId != null) + message.clientTlsPolicyId = String(object.clientTlsPolicyId); + if (object.clientTlsPolicy != null) { + if (typeof object.clientTlsPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest.clientTlsPolicy: object expected"); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.fromObject(object.clientTlsPolicy); + } return message; }; /** - * Creates a plain object from a ListAuthorizationPoliciesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateClientTlsPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} message ListAuthorizationPoliciesRequest + * @param {google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAuthorizationPoliciesRequest.toObject = function toObject(message, options) { + CreateClientTlsPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.clientTlsPolicyId = ""; + object.clientTlsPolicy = 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.clientTlsPolicyId != null && message.hasOwnProperty("clientTlsPolicyId")) + object.clientTlsPolicyId = message.clientTlsPolicyId; + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) + object.clientTlsPolicy = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.toObject(message.clientTlsPolicy, options); return object; }; /** - * Converts this ListAuthorizationPoliciesRequest to JSON. + * Converts this CreateClientTlsPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest * @instance * @returns {Object.} JSON object */ - ListAuthorizationPoliciesRequest.prototype.toJSON = function toJSON() { + CreateClientTlsPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAuthorizationPoliciesRequest + * Gets the default type url for CreateClientTlsPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAuthorizationPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest"; }; - return ListAuthorizationPoliciesRequest; + return CreateClientTlsPolicyRequest; })(); - v1beta1.ListAuthorizationPoliciesResponse = (function() { + v1alpha1.UpdateClientTlsPolicyRequest = (function() { /** - * Properties of a ListAuthorizationPoliciesResponse. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IListAuthorizationPoliciesResponse - * @property {Array.|null} [authorizationPolicies] ListAuthorizationPoliciesResponse authorizationPolicies - * @property {string|null} [nextPageToken] ListAuthorizationPoliciesResponse nextPageToken + * Properties of an UpdateClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IUpdateClientTlsPolicyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateClientTlsPolicyRequest updateMask + * @property {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null} [clientTlsPolicy] UpdateClientTlsPolicyRequest clientTlsPolicy */ /** - * Constructs a new ListAuthorizationPoliciesResponse. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ListAuthorizationPoliciesResponse. - * @implements IListAuthorizationPoliciesResponse + * Constructs a new UpdateClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents an UpdateClientTlsPolicyRequest. + * @implements IUpdateClientTlsPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest=} [properties] Properties to set */ - function ListAuthorizationPoliciesResponse(properties) { - this.authorizationPolicies = []; + function UpdateClientTlsPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10628,94 +10211,91 @@ } /** - * ListAuthorizationPoliciesResponse authorizationPolicies. - * @member {Array.} authorizationPolicies - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * UpdateClientTlsPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @instance */ - ListAuthorizationPoliciesResponse.prototype.authorizationPolicies = $util.emptyArray; + UpdateClientTlsPolicyRequest.prototype.updateMask = null; /** - * ListAuthorizationPoliciesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * UpdateClientTlsPolicyRequest clientTlsPolicy. + * @member {google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null|undefined} clientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @instance */ - ListAuthorizationPoliciesResponse.prototype.nextPageToken = ""; + UpdateClientTlsPolicyRequest.prototype.clientTlsPolicy = null; /** - * Creates a new ListAuthorizationPoliciesResponse instance using the specified properties. + * Creates a new UpdateClientTlsPolicyRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse instance + * @param {google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest instance */ - ListAuthorizationPoliciesResponse.create = function create(properties) { - return new ListAuthorizationPoliciesResponse(properties); + UpdateClientTlsPolicyRequest.create = function create(properties) { + return new UpdateClientTlsPolicyRequest(properties); }; /** - * Encodes the specified ListAuthorizationPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.verify|verify} messages. + * Encodes the specified UpdateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse} message ListAuthorizationPoliciesResponse message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAuthorizationPoliciesResponse.encode = function encode(message, writer) { + UpdateClientTlsPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.authorizationPolicies != null && message.authorizationPolicies.length) - for (var i = 0; i < message.authorizationPolicies.length; ++i) - $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.encode(message.authorizationPolicies[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.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientTlsPolicy != null && Object.hasOwnProperty.call(message, "clientTlsPolicy")) + $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.encode(message.clientTlsPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAuthorizationPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.verify|verify} messages. + * Encodes the specified UpdateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse} message ListAuthorizationPoliciesResponse message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAuthorizationPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + UpdateClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAuthorizationPoliciesResponse message from the specified reader or buffer. + * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse + * @returns {google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAuthorizationPoliciesResponse.decode = function decode(reader, length, error) { + UpdateClientTlsPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.authorizationPolicies && message.authorizationPolicies.length)) - message.authorizationPolicies = []; - message.authorizationPolicies.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.decode(reader, reader.uint32())); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } case 2: { - message.nextPageToken = reader.string(); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.decode(reader, reader.uint32()); break; } default: @@ -10727,148 +10307,141 @@ }; /** - * Decodes a ListAuthorizationPoliciesResponse message from the specified reader or buffer, length delimited. + * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse + * @returns {google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAuthorizationPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + UpdateClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAuthorizationPoliciesResponse message. + * Verifies an UpdateClientTlsPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAuthorizationPoliciesResponse.verify = function verify(message) { + UpdateClientTlsPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.authorizationPolicies != null && message.hasOwnProperty("authorizationPolicies")) { - if (!Array.isArray(message.authorizationPolicies)) - return "authorizationPolicies: array expected"; - for (var i = 0; i < message.authorizationPolicies.length; ++i) { - var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify(message.authorizationPolicies[i]); - if (error) - return "authorizationPolicies." + error; - } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) { + var error = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.verify(message.clientTlsPolicy); + if (error) + return "clientTlsPolicy." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListAuthorizationPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse + * @returns {google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest */ - ListAuthorizationPoliciesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse) + UpdateClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse(); - if (object.authorizationPolicies) { - if (!Array.isArray(object.authorizationPolicies)) - throw TypeError(".google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.authorizationPolicies: array expected"); - message.authorizationPolicies = []; - for (var i = 0; i < object.authorizationPolicies.length; ++i) { - if (typeof object.authorizationPolicies[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.authorizationPolicies: object expected"); - message.authorizationPolicies[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.fromObject(object.authorizationPolicies[i]); - } + var message = new $root.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.clientTlsPolicy != null) { + if (typeof object.clientTlsPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest.clientTlsPolicy: object expected"); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.fromObject(object.clientTlsPolicy); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListAuthorizationPoliciesResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateClientTlsPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} message ListAuthorizationPoliciesResponse + * @param {google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAuthorizationPoliciesResponse.toObject = function toObject(message, options) { + UpdateClientTlsPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.authorizationPolicies = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.authorizationPolicies && message.authorizationPolicies.length) { - object.authorizationPolicies = []; - for (var j = 0; j < message.authorizationPolicies.length; ++j) - object.authorizationPolicies[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.toObject(message.authorizationPolicies[j], options); + if (options.defaults) { + object.updateMask = null; + object.clientTlsPolicy = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) + object.clientTlsPolicy = $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy.toObject(message.clientTlsPolicy, options); return object; }; /** - * Converts this ListAuthorizationPoliciesResponse to JSON. + * Converts this UpdateClientTlsPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @instance * @returns {Object.} JSON object */ - ListAuthorizationPoliciesResponse.prototype.toJSON = function toJSON() { + UpdateClientTlsPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAuthorizationPoliciesResponse + * Gets the default type url for UpdateClientTlsPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @memberof google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAuthorizationPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest"; }; - return ListAuthorizationPoliciesResponse; + return UpdateClientTlsPolicyRequest; })(); - v1beta1.GetAuthorizationPolicyRequest = (function() { + v1alpha1.DeleteClientTlsPolicyRequest = (function() { /** - * Properties of a GetAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IGetAuthorizationPolicyRequest - * @property {string|null} [name] GetAuthorizationPolicyRequest name + * Properties of a DeleteClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IDeleteClientTlsPolicyRequest + * @property {string|null} [name] DeleteClientTlsPolicyRequest name */ /** - * Constructs a new GetAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a GetAuthorizationPolicyRequest. - * @implements IGetAuthorizationPolicyRequest + * Constructs a new DeleteClientTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a DeleteClientTlsPolicyRequest. + * @implements IDeleteClientTlsPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest=} [properties] Properties to set */ - function GetAuthorizationPolicyRequest(properties) { + function DeleteClientTlsPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10876,35 +10449,35 @@ } /** - * GetAuthorizationPolicyRequest name. + * DeleteClientTlsPolicyRequest name. * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @instance */ - GetAuthorizationPolicyRequest.prototype.name = ""; + DeleteClientTlsPolicyRequest.prototype.name = ""; /** - * Creates a new GetAuthorizationPolicyRequest instance using the specified properties. + * Creates a new DeleteClientTlsPolicyRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest instance + * @param {google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest instance */ - GetAuthorizationPolicyRequest.create = function create(properties) { - return new GetAuthorizationPolicyRequest(properties); + DeleteClientTlsPolicyRequest.create = function create(properties) { + return new DeleteClientTlsPolicyRequest(properties); }; /** - * Encodes the specified GetAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified DeleteClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} message GetAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAuthorizationPolicyRequest.encode = function encode(message, writer) { + DeleteClientTlsPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -10913,33 +10486,33 @@ }; /** - * Encodes the specified GetAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified DeleteClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} message GetAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAuthorizationPolicyRequest message from the specified reader or buffer. + * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAuthorizationPolicyRequest.decode = function decode(reader, length, error) { + DeleteClientTlsPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -10958,30 +10531,30 @@ }; /** - * Decodes a GetAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAuthorizationPolicyRequest message. + * Verifies a DeleteClientTlsPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAuthorizationPolicyRequest.verify = function verify(message) { + DeleteClientTlsPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -10991,32 +10564,32 @@ }; /** - * Creates a GetAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest */ - GetAuthorizationPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest) + DeleteClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest(); + var message = new $root.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetAuthorizationPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteClientTlsPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} message GetAuthorizationPolicyRequest + * @param {google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAuthorizationPolicyRequest.toObject = function toObject(message, options) { + DeleteClientTlsPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -11028,54 +10601,52 @@ }; /** - * Converts this GetAuthorizationPolicyRequest to JSON. + * Converts this DeleteClientTlsPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @instance * @returns {Object.} JSON object */ - GetAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { + DeleteClientTlsPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAuthorizationPolicyRequest + * Gets the default type url for DeleteClientTlsPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest"; }; - return GetAuthorizationPolicyRequest; + return DeleteClientTlsPolicyRequest; })(); - v1beta1.CreateAuthorizationPolicyRequest = (function() { + v1alpha1.GrpcEndpoint = (function() { /** - * Properties of a CreateAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface ICreateAuthorizationPolicyRequest - * @property {string|null} [parent] CreateAuthorizationPolicyRequest parent - * @property {string|null} [authorizationPolicyId] CreateAuthorizationPolicyRequest authorizationPolicyId - * @property {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null} [authorizationPolicy] CreateAuthorizationPolicyRequest authorizationPolicy + * Properties of a GrpcEndpoint. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IGrpcEndpoint + * @property {string|null} [targetUri] GrpcEndpoint targetUri */ /** - * Constructs a new CreateAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a CreateAuthorizationPolicyRequest. - * @implements ICreateAuthorizationPolicyRequest + * Constructs a new GrpcEndpoint. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a GrpcEndpoint. + * @implements IGrpcEndpoint * @constructor - * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint=} [properties] Properties to set */ - function CreateAuthorizationPolicyRequest(properties) { + function GrpcEndpoint(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11083,105 +10654,77 @@ } /** - * CreateAuthorizationPolicyRequest parent. - * @member {string} parent - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest - * @instance - */ - CreateAuthorizationPolicyRequest.prototype.parent = ""; - - /** - * CreateAuthorizationPolicyRequest authorizationPolicyId. - * @member {string} authorizationPolicyId - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest - * @instance - */ - CreateAuthorizationPolicyRequest.prototype.authorizationPolicyId = ""; - - /** - * CreateAuthorizationPolicyRequest authorizationPolicy. - * @member {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null|undefined} authorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * GrpcEndpoint targetUri. + * @member {string} targetUri + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @instance */ - CreateAuthorizationPolicyRequest.prototype.authorizationPolicy = null; + GrpcEndpoint.prototype.targetUri = ""; /** - * Creates a new CreateAuthorizationPolicyRequest instance using the specified properties. + * Creates a new GrpcEndpoint instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest instance + * @param {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.GrpcEndpoint} GrpcEndpoint instance */ - CreateAuthorizationPolicyRequest.create = function create(properties) { - return new CreateAuthorizationPolicyRequest(properties); + GrpcEndpoint.create = function create(properties) { + return new GrpcEndpoint(properties); }; /** - * Encodes the specified CreateAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified GrpcEndpoint message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GrpcEndpoint.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} message CreateAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint} message GrpcEndpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAuthorizationPolicyRequest.encode = function encode(message, writer) { + GrpcEndpoint.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.authorizationPolicyId != null && Object.hasOwnProperty.call(message, "authorizationPolicyId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.authorizationPolicyId); - if (message.authorizationPolicy != null && Object.hasOwnProperty.call(message, "authorizationPolicy")) - $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.encode(message.authorizationPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetUri != null && Object.hasOwnProperty.call(message, "targetUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetUri); return writer; }; /** - * Encodes the specified CreateAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified GrpcEndpoint message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.GrpcEndpoint.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} message CreateAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint} message GrpcEndpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + GrpcEndpoint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAuthorizationPolicyRequest message from the specified reader or buffer. + * Decodes a GrpcEndpoint message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.GrpcEndpoint} GrpcEndpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAuthorizationPolicyRequest.decode = function decode(reader, length, error) { + GrpcEndpoint.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.authorizationPolicyId = reader.string(); - break; - } - case 3: { - message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.decode(reader, reader.uint32()); + message.targetUri = reader.string(); break; } default: @@ -11193,145 +10736,124 @@ }; /** - * Decodes a CreateAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a GrpcEndpoint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.GrpcEndpoint} GrpcEndpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + GrpcEndpoint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAuthorizationPolicyRequest message. + * Verifies a GrpcEndpoint message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAuthorizationPolicyRequest.verify = function verify(message) { + GrpcEndpoint.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.authorizationPolicyId != null && message.hasOwnProperty("authorizationPolicyId")) - if (!$util.isString(message.authorizationPolicyId)) - return "authorizationPolicyId: string expected"; - if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) { - var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify(message.authorizationPolicy); - if (error) - return "authorizationPolicy." + error; - } + if (message.targetUri != null && message.hasOwnProperty("targetUri")) + if (!$util.isString(message.targetUri)) + return "targetUri: string expected"; return null; }; /** - * Creates a CreateAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GrpcEndpoint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.GrpcEndpoint} GrpcEndpoint */ - CreateAuthorizationPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest) + GrpcEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.authorizationPolicyId != null) - message.authorizationPolicyId = String(object.authorizationPolicyId); - if (object.authorizationPolicy != null) { - if (typeof object.authorizationPolicy !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest.authorizationPolicy: object expected"); - message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.fromObject(object.authorizationPolicy); - } + var message = new $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint(); + if (object.targetUri != null) + message.targetUri = String(object.targetUri); return message; }; /** - * Creates a plain object from a CreateAuthorizationPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a GrpcEndpoint message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static - * @param {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} message CreateAuthorizationPolicyRequest + * @param {google.cloud.networksecurity.v1alpha1.GrpcEndpoint} message GrpcEndpoint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAuthorizationPolicyRequest.toObject = function toObject(message, options) { + GrpcEndpoint.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.authorizationPolicyId = ""; - object.authorizationPolicy = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.authorizationPolicyId != null && message.hasOwnProperty("authorizationPolicyId")) - object.authorizationPolicyId = message.authorizationPolicyId; - if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) - object.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.toObject(message.authorizationPolicy, options); + if (options.defaults) + object.targetUri = ""; + if (message.targetUri != null && message.hasOwnProperty("targetUri")) + object.targetUri = message.targetUri; return object; }; /** - * Converts this CreateAuthorizationPolicyRequest to JSON. + * Converts this GrpcEndpoint to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @instance * @returns {Object.} JSON object */ - CreateAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { + GrpcEndpoint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateAuthorizationPolicyRequest + * Gets the default type url for GrpcEndpoint * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.GrpcEndpoint * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GrpcEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.GrpcEndpoint"; }; - return CreateAuthorizationPolicyRequest; + return GrpcEndpoint; })(); - v1beta1.UpdateAuthorizationPolicyRequest = (function() { + v1alpha1.ValidationCA = (function() { /** - * Properties of an UpdateAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IUpdateAuthorizationPolicyRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAuthorizationPolicyRequest updateMask - * @property {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null} [authorizationPolicy] UpdateAuthorizationPolicyRequest authorizationPolicy + * Properties of a ValidationCA. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IValidationCA + * @property {string|null} [caCertPath] ValidationCA caCertPath + * @property {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null} [grpcEndpoint] ValidationCA grpcEndpoint + * @property {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null} [certificateProviderInstance] ValidationCA certificateProviderInstance */ /** - * Constructs a new UpdateAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents an UpdateAuthorizationPolicyRequest. - * @implements IUpdateAuthorizationPolicyRequest + * Constructs a new ValidationCA. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a ValidationCA. + * @implements IValidationCA * @constructor - * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1alpha1.IValidationCA=} [properties] Properties to set */ - function UpdateAuthorizationPolicyRequest(properties) { + function ValidationCA(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11339,91 +10861,119 @@ } /** - * UpdateAuthorizationPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * ValidationCA caCertPath. + * @member {string|null|undefined} caCertPath + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @instance */ - UpdateAuthorizationPolicyRequest.prototype.updateMask = null; + ValidationCA.prototype.caCertPath = null; /** - * UpdateAuthorizationPolicyRequest authorizationPolicy. - * @member {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null|undefined} authorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * ValidationCA grpcEndpoint. + * @member {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null|undefined} grpcEndpoint + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @instance */ - UpdateAuthorizationPolicyRequest.prototype.authorizationPolicy = null; + ValidationCA.prototype.grpcEndpoint = null; /** - * Creates a new UpdateAuthorizationPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * ValidationCA certificateProviderInstance. + * @member {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null|undefined} certificateProviderInstance + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA + * @instance + */ + ValidationCA.prototype.certificateProviderInstance = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ValidationCA type. + * @member {"caCertPath"|"grpcEndpoint"|"certificateProviderInstance"|undefined} type + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA + * @instance + */ + Object.defineProperty(ValidationCA.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["caCertPath", "grpcEndpoint", "certificateProviderInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ValidationCA instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest instance + * @param {google.cloud.networksecurity.v1alpha1.IValidationCA=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.ValidationCA} ValidationCA instance */ - UpdateAuthorizationPolicyRequest.create = function create(properties) { - return new UpdateAuthorizationPolicyRequest(properties); + ValidationCA.create = function create(properties) { + return new ValidationCA(properties); }; /** - * Encodes the specified UpdateAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified ValidationCA message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ValidationCA.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} message UpdateAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IValidationCA} message ValidationCA message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAuthorizationPolicyRequest.encode = function encode(message, writer) { + ValidationCA.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.authorizationPolicy != null && Object.hasOwnProperty.call(message, "authorizationPolicy")) - $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.encode(message.authorizationPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.caCertPath != null && Object.hasOwnProperty.call(message, "caCertPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caCertPath); + if (message.grpcEndpoint != null && Object.hasOwnProperty.call(message, "grpcEndpoint")) + $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.encode(message.grpcEndpoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.certificateProviderInstance != null && Object.hasOwnProperty.call(message, "certificateProviderInstance")) + $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.encode(message.certificateProviderInstance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified ValidationCA message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.ValidationCA.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} message UpdateAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.IValidationCA} message ValidationCA message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + ValidationCA.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAuthorizationPolicyRequest message from the specified reader or buffer. + * Decodes a ValidationCA message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.ValidationCA} ValidationCA * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAuthorizationPolicyRequest.decode = function decode(reader, length, error) { + ValidationCA.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.ValidationCA(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.caCertPath = reader.string(); break; } case 2: { - message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.decode(reader, reader.uint32()); + message.grpcEndpoint = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.decode(reader, reader.uint32()); + break; + } + case 3: { + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.decode(reader, reader.uint32()); break; } default: @@ -11435,141 +10985,166 @@ }; /** - * Decodes an UpdateAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a ValidationCA message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.ValidationCA} ValidationCA * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + ValidationCA.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAuthorizationPolicyRequest message. + * Verifies a ValidationCA message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAuthorizationPolicyRequest.verify = function verify(message) { + ValidationCA.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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.caCertPath != null && message.hasOwnProperty("caCertPath")) { + properties.type = 1; + if (!$util.isString(message.caCertPath)) + return "caCertPath: string expected"; } - if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) { - var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify(message.authorizationPolicy); - if (error) - return "authorizationPolicy." + error; + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.verify(message.grpcEndpoint); + if (error) + return "grpcEndpoint." + error; + } + } + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.verify(message.certificateProviderInstance); + if (error) + return "certificateProviderInstance." + error; + } } return null; }; /** - * Creates an UpdateAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ValidationCA message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.ValidationCA} ValidationCA */ - UpdateAuthorizationPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest) + ValidationCA.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.ValidationCA) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.networksecurity.v1alpha1.ValidationCA(); + if (object.caCertPath != null) + message.caCertPath = String(object.caCertPath); + if (object.grpcEndpoint != null) { + if (typeof object.grpcEndpoint !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.ValidationCA.grpcEndpoint: object expected"); + message.grpcEndpoint = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.fromObject(object.grpcEndpoint); } - if (object.authorizationPolicy != null) { - if (typeof object.authorizationPolicy !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.authorizationPolicy: object expected"); - message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.fromObject(object.authorizationPolicy); + if (object.certificateProviderInstance != null) { + if (typeof object.certificateProviderInstance !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.ValidationCA.certificateProviderInstance: object expected"); + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.fromObject(object.certificateProviderInstance); } return message; }; /** - * Creates a plain object from an UpdateAuthorizationPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a ValidationCA message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static - * @param {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} message UpdateAuthorizationPolicyRequest + * @param {google.cloud.networksecurity.v1alpha1.ValidationCA} message ValidationCA * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAuthorizationPolicyRequest.toObject = function toObject(message, options) { + ValidationCA.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.updateMask = null; - object.authorizationPolicy = null; + if (message.caCertPath != null && message.hasOwnProperty("caCertPath")) { + object.caCertPath = message.caCertPath; + if (options.oneofs) + object.type = "caCertPath"; + } + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + object.grpcEndpoint = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.toObject(message.grpcEndpoint, options); + if (options.oneofs) + object.type = "grpcEndpoint"; + } + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + object.certificateProviderInstance = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.toObject(message.certificateProviderInstance, options); + if (options.oneofs) + object.type = "certificateProviderInstance"; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) - object.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.toObject(message.authorizationPolicy, options); return object; }; /** - * Converts this UpdateAuthorizationPolicyRequest to JSON. + * Converts this ValidationCA to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @instance * @returns {Object.} JSON object */ - UpdateAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { + ValidationCA.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateAuthorizationPolicyRequest + * Gets the default type url for ValidationCA * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.ValidationCA * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ValidationCA.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.ValidationCA"; }; - return UpdateAuthorizationPolicyRequest; + return ValidationCA; })(); - v1beta1.DeleteAuthorizationPolicyRequest = (function() { + v1alpha1.CertificateProviderInstance = (function() { /** - * Properties of a DeleteAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IDeleteAuthorizationPolicyRequest - * @property {string|null} [name] DeleteAuthorizationPolicyRequest name + * Properties of a CertificateProviderInstance. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface ICertificateProviderInstance + * @property {string|null} [pluginInstance] CertificateProviderInstance pluginInstance */ /** - * Constructs a new DeleteAuthorizationPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a DeleteAuthorizationPolicyRequest. - * @implements IDeleteAuthorizationPolicyRequest + * Constructs a new CertificateProviderInstance. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a CertificateProviderInstance. + * @implements ICertificateProviderInstance * @constructor - * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance=} [properties] Properties to set */ - function DeleteAuthorizationPolicyRequest(properties) { + function CertificateProviderInstance(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11577,77 +11152,77 @@ } /** - * DeleteAuthorizationPolicyRequest name. - * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * CertificateProviderInstance pluginInstance. + * @member {string} pluginInstance + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @instance */ - DeleteAuthorizationPolicyRequest.prototype.name = ""; + CertificateProviderInstance.prototype.pluginInstance = ""; /** - * Creates a new DeleteAuthorizationPolicyRequest instance using the specified properties. + * Creates a new CertificateProviderInstance instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest instance + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProviderInstance} CertificateProviderInstance instance */ - DeleteAuthorizationPolicyRequest.create = function create(properties) { - return new DeleteAuthorizationPolicyRequest(properties); + CertificateProviderInstance.create = function create(properties) { + return new CertificateProviderInstance(properties); }; /** - * Encodes the specified DeleteAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified CertificateProviderInstance message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} message DeleteAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance} message CertificateProviderInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAuthorizationPolicyRequest.encode = function encode(message, writer) { + CertificateProviderInstance.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.pluginInstance != null && Object.hasOwnProperty.call(message, "pluginInstance")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pluginInstance); return writer; }; /** - * Encodes the specified DeleteAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest.verify|verify} messages. + * Encodes the specified CertificateProviderInstance message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} message DeleteAuthorizationPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance} message CertificateProviderInstance message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + CertificateProviderInstance.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAuthorizationPolicyRequest message from the specified reader or buffer. + * Decodes a CertificateProviderInstance message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProviderInstance} CertificateProviderInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAuthorizationPolicyRequest.decode = function decode(reader, length, error) { + CertificateProviderInstance.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.pluginInstance = reader.string(); break; } default: @@ -11659,131 +11234,124 @@ }; /** - * Decodes a DeleteAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a CertificateProviderInstance message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProviderInstance} CertificateProviderInstance * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + CertificateProviderInstance.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAuthorizationPolicyRequest message. + * Verifies a CertificateProviderInstance message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAuthorizationPolicyRequest.verify = function verify(message) { + CertificateProviderInstance.verify = function verify(message) { if (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.pluginInstance != null && message.hasOwnProperty("pluginInstance")) + if (!$util.isString(message.pluginInstance)) + return "pluginInstance: string expected"; return null; }; /** - * Creates a DeleteAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CertificateProviderInstance message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProviderInstance} CertificateProviderInstance */ - DeleteAuthorizationPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest) + CertificateProviderInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance(); + if (object.pluginInstance != null) + message.pluginInstance = String(object.pluginInstance); return message; }; /** - * Creates a plain object from a DeleteAuthorizationPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a CertificateProviderInstance message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static - * @param {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} message DeleteAuthorizationPolicyRequest + * @param {google.cloud.networksecurity.v1alpha1.CertificateProviderInstance} message CertificateProviderInstance * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAuthorizationPolicyRequest.toObject = function toObject(message, options) { + CertificateProviderInstance.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; + object.pluginInstance = ""; + if (message.pluginInstance != null && message.hasOwnProperty("pluginInstance")) + object.pluginInstance = message.pluginInstance; return object; }; /** - * Converts this DeleteAuthorizationPolicyRequest to JSON. + * Converts this CertificateProviderInstance to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @instance * @returns {Object.} JSON object */ - DeleteAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { + CertificateProviderInstance.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteAuthorizationPolicyRequest + * Gets the default type url for CertificateProviderInstance * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProviderInstance * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CertificateProviderInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.CertificateProviderInstance"; }; - return DeleteAuthorizationPolicyRequest; + return CertificateProviderInstance; })(); - v1beta1.ClientTlsPolicy = (function() { + v1alpha1.CertificateProvider = (function() { /** - * Properties of a ClientTlsPolicy. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IClientTlsPolicy - * @property {string|null} [name] ClientTlsPolicy name - * @property {string|null} [description] ClientTlsPolicy description - * @property {google.protobuf.ITimestamp|null} [createTime] ClientTlsPolicy createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ClientTlsPolicy updateTime - * @property {Object.|null} [labels] ClientTlsPolicy labels - * @property {string|null} [sni] ClientTlsPolicy sni - * @property {google.cloud.networksecurity.v1beta1.ICertificateProvider|null} [clientCertificate] ClientTlsPolicy clientCertificate - * @property {Array.|null} [serverValidationCa] ClientTlsPolicy serverValidationCa + * Properties of a CertificateProvider. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface ICertificateProvider + * @property {google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles|null} [localFilepath] CertificateProvider localFilepath + * @property {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null} [grpcEndpoint] CertificateProvider grpcEndpoint + * @property {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null} [certificateProviderInstance] CertificateProvider certificateProviderInstance */ /** - * Constructs a new ClientTlsPolicy. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ClientTlsPolicy. - * @implements IClientTlsPolicy + * Constructs a new CertificateProvider. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a CertificateProvider. + * @implements ICertificateProvider * @constructor - * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProvider=} [properties] Properties to set */ - function ClientTlsPolicy(properties) { - this.labels = {}; - this.serverValidationCa = []; + function CertificateProvider(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11791,198 +11359,119 @@ } /** - * ClientTlsPolicy name. - * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy - * @instance - */ - ClientTlsPolicy.prototype.name = ""; - - /** - * ClientTlsPolicy description. - * @member {string} description - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy - * @instance - */ - ClientTlsPolicy.prototype.description = ""; - - /** - * ClientTlsPolicy createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy - * @instance - */ - ClientTlsPolicy.prototype.createTime = null; - - /** - * ClientTlsPolicy updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * CertificateProvider localFilepath. + * @member {google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles|null|undefined} localFilepath + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @instance */ - ClientTlsPolicy.prototype.updateTime = null; + CertificateProvider.prototype.localFilepath = null; /** - * ClientTlsPolicy labels. - * @member {Object.} labels - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * CertificateProvider grpcEndpoint. + * @member {google.cloud.networksecurity.v1alpha1.IGrpcEndpoint|null|undefined} grpcEndpoint + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @instance */ - ClientTlsPolicy.prototype.labels = $util.emptyObject; + CertificateProvider.prototype.grpcEndpoint = null; /** - * ClientTlsPolicy sni. - * @member {string} sni - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * CertificateProvider certificateProviderInstance. + * @member {google.cloud.networksecurity.v1alpha1.ICertificateProviderInstance|null|undefined} certificateProviderInstance + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @instance */ - ClientTlsPolicy.prototype.sni = ""; + CertificateProvider.prototype.certificateProviderInstance = null; - /** - * ClientTlsPolicy clientCertificate. - * @member {google.cloud.networksecurity.v1beta1.ICertificateProvider|null|undefined} clientCertificate - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy - * @instance - */ - ClientTlsPolicy.prototype.clientCertificate = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ClientTlsPolicy serverValidationCa. - * @member {Array.} serverValidationCa - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * CertificateProvider type. + * @member {"localFilepath"|"grpcEndpoint"|"certificateProviderInstance"|undefined} type + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @instance */ - ClientTlsPolicy.prototype.serverValidationCa = $util.emptyArray; + Object.defineProperty(CertificateProvider.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["localFilepath", "grpcEndpoint", "certificateProviderInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ClientTlsPolicy instance using the specified properties. + * Creates a new CertificateProvider instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static - * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy instance + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProvider=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider} CertificateProvider instance */ - ClientTlsPolicy.create = function create(properties) { - return new ClientTlsPolicy(properties); + CertificateProvider.create = function create(properties) { + return new CertificateProvider(properties); }; /** - * Encodes the specified ClientTlsPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify|verify} messages. + * Encodes the specified CertificateProvider message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static - * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy} message ClientTlsPolicy message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProvider} message CertificateProvider message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientTlsPolicy.encode = function encode(message, writer) { + CertificateProvider.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.sni != null && Object.hasOwnProperty.call(message, "sni")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sni); - if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) - $root.google.cloud.networksecurity.v1beta1.CertificateProvider.encode(message.clientCertificate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.serverValidationCa != null && message.serverValidationCa.length) - for (var i = 0; i < message.serverValidationCa.length; ++i) - $root.google.cloud.networksecurity.v1beta1.ValidationCA.encode(message.serverValidationCa[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.localFilepath != null && Object.hasOwnProperty.call(message, "localFilepath")) + $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.encode(message.localFilepath, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.grpcEndpoint != null && Object.hasOwnProperty.call(message, "grpcEndpoint")) + $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.encode(message.grpcEndpoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.certificateProviderInstance != null && Object.hasOwnProperty.call(message, "certificateProviderInstance")) + $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.encode(message.certificateProviderInstance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ClientTlsPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify|verify} messages. + * Encodes the specified CertificateProvider message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static - * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy} message ClientTlsPolicy message or plain object to encode + * @param {google.cloud.networksecurity.v1alpha1.ICertificateProvider} message CertificateProvider message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientTlsPolicy.encodeDelimited = function encodeDelimited(message, writer) { + CertificateProvider.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientTlsPolicy message from the specified reader or buffer. + * Decodes a CertificateProvider message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider} CertificateProvider * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientTlsPolicy.decode = function decode(reader, length, error) { + CertificateProvider.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.CertificateProvider(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.localFilepath = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.decode(reader, reader.uint32()); break; } case 2: { - message.description = reader.string(); + message.grpcEndpoint = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.decode(reader, reader.uint32()); break; } case 3: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 4: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 6: { - message.sni = reader.string(); - break; - } - case 7: { - message.clientCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.decode(reader, reader.uint32()); - break; - } - case 8: { - if (!(message.serverValidationCa && message.serverValidationCa.length)) - message.serverValidationCa = []; - message.serverValidationCa.push($root.google.cloud.networksecurity.v1beta1.ValidationCA.decode(reader, reader.uint32())); + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.decode(reader, reader.uint32()); break; } default: @@ -11994,335 +11483,569 @@ }; /** - * Decodes a ClientTlsPolicy message from the specified reader or buffer, length delimited. + * Decodes a CertificateProvider message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider} CertificateProvider * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientTlsPolicy.decodeDelimited = function decodeDelimited(reader) { + CertificateProvider.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientTlsPolicy message. + * Verifies a CertificateProvider message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ClientTlsPolicy.verify = function verify(message) { + CertificateProvider.verify = function verify(message) { if (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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; + var properties = {}; + if (message.localFilepath != null && message.hasOwnProperty("localFilepath")) { + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.verify(message.localFilepath); + if (error) + return "localFilepath." + error; + } } - if (message.sni != null && message.hasOwnProperty("sni")) - if (!$util.isString(message.sni)) - return "sni: string expected"; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) { - var error = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.verify(message.clientCertificate); - if (error) - return "clientCertificate." + error; + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.verify(message.grpcEndpoint); + if (error) + return "grpcEndpoint." + error; + } } - if (message.serverValidationCa != null && message.hasOwnProperty("serverValidationCa")) { - if (!Array.isArray(message.serverValidationCa)) - return "serverValidationCa: array expected"; - for (var i = 0; i < message.serverValidationCa.length; ++i) { - var error = $root.google.cloud.networksecurity.v1beta1.ValidationCA.verify(message.serverValidationCa[i]); + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.verify(message.certificateProviderInstance); if (error) - return "serverValidationCa." + error; + return "certificateProviderInstance." + error; } } return null; }; /** - * Creates a ClientTlsPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a CertificateProvider message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider} CertificateProvider */ - ClientTlsPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy) + CertificateProvider.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.CertificateProvider) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.networksecurity.v1alpha1.CertificateProvider(); + if (object.localFilepath != null) { + if (typeof object.localFilepath !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.CertificateProvider.localFilepath: object expected"); + message.localFilepath = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.fromObject(object.localFilepath); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.sni != null) - message.sni = String(object.sni); - if (object.clientCertificate != null) { - if (typeof object.clientCertificate !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.clientCertificate: object expected"); - message.clientCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.fromObject(object.clientCertificate); + if (object.grpcEndpoint != null) { + if (typeof object.grpcEndpoint !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.CertificateProvider.grpcEndpoint: object expected"); + message.grpcEndpoint = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.fromObject(object.grpcEndpoint); } - if (object.serverValidationCa) { - if (!Array.isArray(object.serverValidationCa)) - throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.serverValidationCa: array expected"); - message.serverValidationCa = []; - for (var i = 0; i < object.serverValidationCa.length; ++i) { - if (typeof object.serverValidationCa[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.serverValidationCa: object expected"); - message.serverValidationCa[i] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.fromObject(object.serverValidationCa[i]); - } + if (object.certificateProviderInstance != null) { + if (typeof object.certificateProviderInstance !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.CertificateProvider.certificateProviderInstance: object expected"); + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.fromObject(object.certificateProviderInstance); } return message; }; /** - * Creates a plain object from a ClientTlsPolicy message. Also converts values to other types if specified. + * Creates a plain object from a CertificateProvider message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static - * @param {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} message ClientTlsPolicy + * @param {google.cloud.networksecurity.v1alpha1.CertificateProvider} message CertificateProvider * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientTlsPolicy.toObject = function toObject(message, options) { + CertificateProvider.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.serverValidationCa = []; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.createTime = null; - object.updateTime = null; - object.sni = ""; - object.clientCertificate = null; + if (message.localFilepath != null && message.hasOwnProperty("localFilepath")) { + object.localFilepath = $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.toObject(message.localFilepath, options); + if (options.oneofs) + object.type = "localFilepath"; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - 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); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + object.grpcEndpoint = $root.google.cloud.networksecurity.v1alpha1.GrpcEndpoint.toObject(message.grpcEndpoint, options); + if (options.oneofs) + object.type = "grpcEndpoint"; } - if (message.sni != null && message.hasOwnProperty("sni")) - object.sni = message.sni; - if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) - object.clientCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.toObject(message.clientCertificate, options); - if (message.serverValidationCa && message.serverValidationCa.length) { - object.serverValidationCa = []; - for (var j = 0; j < message.serverValidationCa.length; ++j) - object.serverValidationCa[j] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.toObject(message.serverValidationCa[j], options); + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + object.certificateProviderInstance = $root.google.cloud.networksecurity.v1alpha1.CertificateProviderInstance.toObject(message.certificateProviderInstance, options); + if (options.oneofs) + object.type = "certificateProviderInstance"; } return object; }; /** - * Converts this ClientTlsPolicy to JSON. + * Converts this CertificateProvider to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @instance * @returns {Object.} JSON object */ - ClientTlsPolicy.prototype.toJSON = function toJSON() { + CertificateProvider.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClientTlsPolicy + * Gets the default type url for CertificateProvider * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClientTlsPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CertificateProvider.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ClientTlsPolicy"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.CertificateProvider"; }; - return ClientTlsPolicy; - })(); + CertificateProvider.TlsCertificateFiles = (function() { - v1beta1.ListClientTlsPoliciesRequest = (function() { + /** + * Properties of a TlsCertificateFiles. + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider + * @interface ITlsCertificateFiles + * @property {string|null} [certificatePath] TlsCertificateFiles certificatePath + * @property {string|null} [privateKeyPath] TlsCertificateFiles privateKeyPath + */ - /** - * Properties of a ListClientTlsPoliciesRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IListClientTlsPoliciesRequest - * @property {string|null} [parent] ListClientTlsPoliciesRequest parent - * @property {number|null} [pageSize] ListClientTlsPoliciesRequest pageSize - * @property {string|null} [pageToken] ListClientTlsPoliciesRequest pageToken - */ + /** + * Constructs a new TlsCertificateFiles. + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider + * @classdesc Represents a TlsCertificateFiles. + * @implements ITlsCertificateFiles + * @constructor + * @param {google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles=} [properties] Properties to set + */ + function TlsCertificateFiles(properties) { + if (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 ListClientTlsPoliciesRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ListClientTlsPoliciesRequest. - * @implements IListClientTlsPoliciesRequest - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest=} [properties] Properties to set - */ - function ListClientTlsPoliciesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * TlsCertificateFiles certificatePath. + * @member {string} certificatePath + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @instance + */ + TlsCertificateFiles.prototype.certificatePath = ""; - /** - * ListClientTlsPoliciesRequest parent. - * @member {string} parent - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest - * @instance - */ - ListClientTlsPoliciesRequest.prototype.parent = ""; + /** + * TlsCertificateFiles privateKeyPath. + * @member {string} privateKeyPath + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @instance + */ + TlsCertificateFiles.prototype.privateKeyPath = ""; - /** - * ListClientTlsPoliciesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest - * @instance - */ - ListClientTlsPoliciesRequest.prototype.pageSize = 0; + /** + * Creates a new TlsCertificateFiles instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles} TlsCertificateFiles instance + */ + TlsCertificateFiles.create = function create(properties) { + return new TlsCertificateFiles(properties); + }; - /** - * ListClientTlsPoliciesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest - * @instance - */ - ListClientTlsPoliciesRequest.prototype.pageToken = ""; + /** + * Encodes the specified TlsCertificateFiles message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles} message TlsCertificateFiles message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TlsCertificateFiles.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificatePath != null && Object.hasOwnProperty.call(message, "certificatePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.certificatePath); + if (message.privateKeyPath != null && Object.hasOwnProperty.call(message, "privateKeyPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.privateKeyPath); + return writer; + }; - /** - * Creates a new ListClientTlsPoliciesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest instance - */ - ListClientTlsPoliciesRequest.create = function create(properties) { - return new ListClientTlsPoliciesRequest(properties); - }; + /** + * Encodes the specified TlsCertificateFiles message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {google.cloud.networksecurity.v1alpha1.CertificateProvider.ITlsCertificateFiles} message TlsCertificateFiles message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TlsCertificateFiles.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified ListClientTlsPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClientTlsPoliciesRequest.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; - }; + /** + * Decodes a TlsCertificateFiles message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles} TlsCertificateFiles + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TlsCertificateFiles.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.certificatePath = reader.string(); + break; + } + case 2: { + message.privateKeyPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified ListClientTlsPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListClientTlsPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a TlsCertificateFiles message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles} TlsCertificateFiles + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TlsCertificateFiles.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer. + /** + * Verifies a TlsCertificateFiles message. + * @function verify + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TlsCertificateFiles.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificatePath != null && message.hasOwnProperty("certificatePath")) + if (!$util.isString(message.certificatePath)) + return "certificatePath: string expected"; + if (message.privateKeyPath != null && message.hasOwnProperty("privateKeyPath")) + if (!$util.isString(message.privateKeyPath)) + return "privateKeyPath: string expected"; + return null; + }; + + /** + * Creates a TlsCertificateFiles message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles} TlsCertificateFiles + */ + TlsCertificateFiles.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles) + return object; + var message = new $root.google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles(); + if (object.certificatePath != null) + message.certificatePath = String(object.certificatePath); + if (object.privateKeyPath != null) + message.privateKeyPath = String(object.privateKeyPath); + return message; + }; + + /** + * Creates a plain object from a TlsCertificateFiles message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles} message TlsCertificateFiles + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TlsCertificateFiles.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificatePath = ""; + object.privateKeyPath = ""; + } + if (message.certificatePath != null && message.hasOwnProperty("certificatePath")) + object.certificatePath = message.certificatePath; + if (message.privateKeyPath != null && message.hasOwnProperty("privateKeyPath")) + object.privateKeyPath = message.privateKeyPath; + return object; + }; + + /** + * Converts this TlsCertificateFiles to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @instance + * @returns {Object.} JSON object + */ + TlsCertificateFiles.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TlsCertificateFiles + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TlsCertificateFiles.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.CertificateProvider.TlsCertificateFiles"; + }; + + return TlsCertificateFiles; + })(); + + return CertificateProvider; + })(); + + v1alpha1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.networksecurity.v1alpha1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.networksecurity.v1alpha1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @static + * @param {google.cloud.networksecurity.v1alpha1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1alpha1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @static + * @param {google.cloud.networksecurity.v1alpha1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1alpha1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata + * @static + * @param {google.cloud.networksecurity.v1alpha1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest + * @returns {google.cloud.networksecurity.v1alpha1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListClientTlsPoliciesRequest.decode = function decode(reader, length, error) { + OperationMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1alpha1.OperationMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.pageToken = reader.string(); + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); break; } default: @@ -12334,389 +12057,401 @@ }; /** - * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer, length delimited. + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest + * @returns {google.cloud.networksecurity.v1alpha1.OperationMetadata} OperationMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListClientTlsPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListClientTlsPoliciesRequest message. + * Verifies an OperationMetadata message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListClientTlsPoliciesRequest.verify = function verify(message) { + OperationMetadata.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.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.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; return null; }; /** - * Creates a ListClientTlsPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest + * @returns {google.cloud.networksecurity.v1alpha1.OperationMetadata} OperationMetadata */ - ListClientTlsPoliciesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest) + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1alpha1.OperationMetadata) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest(); - 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); + var message = new $root.google.cloud.networksecurity.v1alpha1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networksecurity.v1alpha1.OperationMetadata.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.networksecurity.v1alpha1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from a ListClientTlsPoliciesRequest message. Also converts values to other types if specified. + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata * @static - * @param {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest + * @param {google.cloud.networksecurity.v1alpha1.OperationMetadata} message OperationMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListClientTlsPoliciesRequest.toObject = function toObject(message, options) { + OperationMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; } - 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.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.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; return object; }; /** - * Converts this ListClientTlsPoliciesRequest to JSON. + * Converts this OperationMetadata to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata * @instance * @returns {Object.} JSON object */ - ListClientTlsPoliciesRequest.prototype.toJSON = function toJSON() { + OperationMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListClientTlsPoliciesRequest + * Gets the default type url for OperationMetadata * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1alpha1.OperationMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListClientTlsPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1alpha1.OperationMetadata"; }; - return ListClientTlsPoliciesRequest; + return OperationMetadata; })(); - v1beta1.ListClientTlsPoliciesResponse = (function() { + v1alpha1.NetworkSecurity = (function() { /** - * Properties of a ListClientTlsPoliciesResponse. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IListClientTlsPoliciesResponse - * @property {Array.|null} [clientTlsPolicies] ListClientTlsPoliciesResponse clientTlsPolicies - * @property {string|null} [nextPageToken] ListClientTlsPoliciesResponse nextPageToken + * Constructs a new NetworkSecurity service. + * @memberof google.cloud.networksecurity.v1alpha1 + * @classdesc Represents a NetworkSecurity + * @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 NetworkSecurity(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (NetworkSecurity.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetworkSecurity; /** - * Constructs a new ListClientTlsPoliciesResponse. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ListClientTlsPoliciesResponse. - * @implements IListClientTlsPoliciesResponse - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse=} [properties] Properties to set + * Creates new NetworkSecurity service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @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 {NetworkSecurity} RPC service. Useful where requests and/or responses are streamed. */ - function ListClientTlsPoliciesResponse(properties) { - this.clientTlsPolicies = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + NetworkSecurity.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * ListClientTlsPoliciesResponse clientTlsPolicies. - * @member {Array.} clientTlsPolicies - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @instance + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|listClientTlsPolicies}. + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @typedef ListClientTlsPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse} [response] ListClientTlsPoliciesResponse */ - ListClientTlsPoliciesResponse.prototype.clientTlsPolicies = $util.emptyArray; /** - * ListClientTlsPoliciesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse + * Calls ListClientTlsPolicies. + * @function listClientTlsPolicies + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity * @instance + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest} request ListClientTlsPoliciesRequest message or plain object + * @param {google.cloud.networksecurity.v1alpha1.NetworkSecurity.ListClientTlsPoliciesCallback} callback Node-style callback called with the error, if any, and ListClientTlsPoliciesResponse + * @returns {undefined} + * @variation 1 */ - ListClientTlsPoliciesResponse.prototype.nextPageToken = ""; + Object.defineProperty(NetworkSecurity.prototype.listClientTlsPolicies = function listClientTlsPolicies(request, callback) { + return this.rpcCall(listClientTlsPolicies, $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest, $root.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse, request, callback); + }, "name", { value: "ListClientTlsPolicies" }); /** - * Creates a new ListClientTlsPoliciesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse instance + * Calls ListClientTlsPolicies. + * @function listClientTlsPolicies + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest} request ListClientTlsPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListClientTlsPoliciesResponse.create = function create(properties) { - return new ListClientTlsPoliciesResponse(properties); - }; /** - * Encodes the specified ListClientTlsPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|getClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @typedef GetClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} [response] ClientTlsPolicy */ - ListClientTlsPoliciesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientTlsPolicies != null && message.clientTlsPolicies.length) - for (var i = 0; i < message.clientTlsPolicies.length; ++i) - $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.encode(message.clientTlsPolicies[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 ListClientTlsPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls GetClientTlsPolicy. + * @function getClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest} request GetClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1alpha1.NetworkSecurity.GetClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and ClientTlsPolicy + * @returns {undefined} + * @variation 1 */ - ListClientTlsPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(NetworkSecurity.prototype.getClientTlsPolicy = function getClientTlsPolicy(request, callback) { + return this.rpcCall(getClientTlsPolicy, $root.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest, $root.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy, request, callback); + }, "name", { value: "GetClientTlsPolicy" }); /** - * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls GetClientTlsPolicy. + * @function getClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest} request GetClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListClientTlsPoliciesResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.clientTlsPolicies && message.clientTlsPolicies.length)) - message.clientTlsPolicies = []; - message.clientTlsPolicies.push($root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|createClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @typedef CreateClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListClientTlsPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a ListClientTlsPoliciesResponse message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls CreateClientTlsPolicy. + * @function createClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest} request CreateClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1alpha1.NetworkSecurity.CreateClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListClientTlsPoliciesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientTlsPolicies != null && message.hasOwnProperty("clientTlsPolicies")) { - if (!Array.isArray(message.clientTlsPolicies)) - return "clientTlsPolicies: array expected"; - for (var i = 0; i < message.clientTlsPolicies.length; ++i) { - var error = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify(message.clientTlsPolicies[i]); - if (error) - return "clientTlsPolicies." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; + Object.defineProperty(NetworkSecurity.prototype.createClientTlsPolicy = function createClientTlsPolicy(request, callback) { + return this.rpcCall(createClientTlsPolicy, $root.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateClientTlsPolicy" }); /** - * Creates a ListClientTlsPoliciesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse + * Calls CreateClientTlsPolicy. + * @function createClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest} request CreateClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListClientTlsPoliciesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse(); - if (object.clientTlsPolicies) { - if (!Array.isArray(object.clientTlsPolicies)) - throw TypeError(".google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.clientTlsPolicies: array expected"); - message.clientTlsPolicies = []; - for (var i = 0; i < object.clientTlsPolicies.length; ++i) { - if (typeof object.clientTlsPolicies[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.clientTlsPolicies: object expected"); - message.clientTlsPolicies[i] = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.fromObject(object.clientTlsPolicies[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; /** - * Creates a plain object from a ListClientTlsPoliciesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|updateClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @typedef UpdateClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - ListClientTlsPoliciesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.clientTlsPolicies = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.clientTlsPolicies && message.clientTlsPolicies.length) { - object.clientTlsPolicies = []; - for (var j = 0; j < message.clientTlsPolicies.length; ++j) - object.clientTlsPolicies[j] = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.toObject(message.clientTlsPolicies[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; /** - * Converts this ListClientTlsPoliciesResponse to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse + * Calls UpdateClientTlsPolicy. + * @function updateClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity * @instance - * @returns {Object.} JSON object + * @param {google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest} request UpdateClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1alpha1.NetworkSecurity.UpdateClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - ListClientTlsPoliciesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(NetworkSecurity.prototype.updateClientTlsPolicy = function updateClientTlsPolicy(request, callback) { + return this.rpcCall(updateClientTlsPolicy, $root.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateClientTlsPolicy" }); /** - * Gets the default type url for ListClientTlsPoliciesResponse - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Calls UpdateClientTlsPolicy. + * @function updateClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest} request UpdateClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - ListClientTlsPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse"; - }; - return ListClientTlsPoliciesResponse; + /** + * Callback as used by {@link google.cloud.networksecurity.v1alpha1.NetworkSecurity|deleteClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @typedef DeleteClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteClientTlsPolicy. + * @function deleteClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest} request DeleteClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1alpha1.NetworkSecurity.DeleteClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.deleteClientTlsPolicy = function deleteClientTlsPolicy(request, callback) { + return this.rpcCall(deleteClientTlsPolicy, $root.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteClientTlsPolicy" }); + + /** + * Calls DeleteClientTlsPolicy. + * @function deleteClientTlsPolicy + * @memberof google.cloud.networksecurity.v1alpha1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest} request DeleteClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return NetworkSecurity; })(); - v1beta1.GetClientTlsPolicyRequest = (function() { + return v1alpha1; + })(); + + networksecurity.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.networksecurity + * @namespace + */ + var v1beta1 = {}; + + v1beta1.AuthorizationPolicy = (function() { /** - * Properties of a GetClientTlsPolicyRequest. + * Properties of an AuthorizationPolicy. * @memberof google.cloud.networksecurity.v1beta1 - * @interface IGetClientTlsPolicyRequest - * @property {string|null} [name] GetClientTlsPolicyRequest name + * @interface IAuthorizationPolicy + * @property {string|null} [name] AuthorizationPolicy name + * @property {string|null} [description] AuthorizationPolicy description + * @property {google.protobuf.ITimestamp|null} [createTime] AuthorizationPolicy createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] AuthorizationPolicy updateTime + * @property {Object.|null} [labels] AuthorizationPolicy labels + * @property {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action|null} [action] AuthorizationPolicy action + * @property {Array.|null} [rules] AuthorizationPolicy rules */ /** - * Constructs a new GetClientTlsPolicyRequest. + * Constructs a new AuthorizationPolicy. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a GetClientTlsPolicyRequest. - * @implements IGetClientTlsPolicyRequest + * @classdesc Represents an AuthorizationPolicy. + * @implements IAuthorizationPolicy * @constructor - * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy=} [properties] Properties to set */ - function GetClientTlsPolicyRequest(properties) { + function AuthorizationPolicy(properties) { + this.labels = {}; + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12724,70 +12459,132 @@ } /** - * GetClientTlsPolicyRequest name. + * AuthorizationPolicy name. * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @instance */ - GetClientTlsPolicyRequest.prototype.name = ""; + AuthorizationPolicy.prototype.name = ""; /** - * Creates a new GetClientTlsPolicyRequest instance using the specified properties. + * AuthorizationPolicy description. + * @member {string} description + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @instance + */ + AuthorizationPolicy.prototype.description = ""; + + /** + * AuthorizationPolicy createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @instance + */ + AuthorizationPolicy.prototype.createTime = null; + + /** + * AuthorizationPolicy updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @instance + */ + AuthorizationPolicy.prototype.updateTime = null; + + /** + * AuthorizationPolicy labels. + * @member {Object.} labels + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @instance + */ + AuthorizationPolicy.prototype.labels = $util.emptyObject; + + /** + * AuthorizationPolicy action. + * @member {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action} action + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @instance + */ + AuthorizationPolicy.prototype.action = 0; + + /** + * AuthorizationPolicy rules. + * @member {Array.} rules + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @instance + */ + AuthorizationPolicy.prototype.rules = $util.emptyArray; + + /** + * Creates a new AuthorizationPolicy instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest instance + * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy instance */ - GetClientTlsPolicyRequest.create = function create(properties) { - return new GetClientTlsPolicyRequest(properties); + AuthorizationPolicy.create = function create(properties) { + return new AuthorizationPolicy(properties); }; /** - * Encodes the specified GetClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest.verify|verify} messages. + * Encodes the specified AuthorizationPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} message GetClientTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy} message AuthorizationPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetClientTlsPolicyRequest.encode = function encode(message, writer) { + AuthorizationPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.action); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.encode(message.rules[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest.verify|verify} messages. + * Encodes the specified AuthorizationPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} message GetClientTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy} message AuthorizationPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + AuthorizationPolicy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer. + * Decodes an AuthorizationPolicy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetClientTlsPolicyRequest.decode = function decode(reader, length, error) { + AuthorizationPolicy.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -12797,6 +12594,51 @@ message.name = reader.string(); break; } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.action = reader.int32(); + break; + } + case 7: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -12806,1029 +12648,1372 @@ }; /** - * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes an AuthorizationPolicy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + AuthorizationPolicy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetClientTlsPolicyRequest message. + * Verifies an AuthorizationPolicy message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetClientTlsPolicyRequest.verify = function verify(message) { + AuthorizationPolicy.verify = function verify(message) { if (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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } return null; }; /** - * Creates a GetClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates an AuthorizationPolicy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} AuthorizationPolicy */ - GetClientTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest) + AuthorizationPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest(); + var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy(); if (object.name != null) message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.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.networksecurity.v1beta1.AuthorizationPolicy.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "ALLOW": + case 1: + message.action = 1; + break; + case "DENY": + case 2: + message.action = 2; + break; + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.rules: object expected"); + message.rules[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.fromObject(object.rules[i]); + } + } return message; }; /** - * Creates a plain object from a GetClientTlsPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from an AuthorizationPolicy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} message GetClientTlsPolicyRequest + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} message AuthorizationPolicy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetClientTlsPolicyRequest.toObject = function toObject(message, options) { + AuthorizationPolicy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.arrays || options.defaults) + object.rules = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.action = options.enums === String ? "ACTION_UNSPECIFIED" : 0; + } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action[message.action] === undefined ? message.action : $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action[message.action] : message.action; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.toObject(message.rules[j], options); + } return object; }; /** - * Converts this GetClientTlsPolicyRequest to JSON. + * Converts this AuthorizationPolicy to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @instance * @returns {Object.} JSON object */ - GetClientTlsPolicyRequest.prototype.toJSON = function toJSON() { + AuthorizationPolicy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetClientTlsPolicyRequest + * Gets the default type url for AuthorizationPolicy * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AuthorizationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy"; }; - return GetClientTlsPolicyRequest; - })(); - - v1beta1.CreateClientTlsPolicyRequest = (function() { + AuthorizationPolicy.Rule = (function() { - /** - * Properties of a CreateClientTlsPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface ICreateClientTlsPolicyRequest - * @property {string|null} [parent] CreateClientTlsPolicyRequest parent - * @property {string|null} [clientTlsPolicyId] CreateClientTlsPolicyRequest clientTlsPolicyId - * @property {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null} [clientTlsPolicy] CreateClientTlsPolicyRequest clientTlsPolicy - */ + /** + * Properties of a Rule. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @interface IRule + * @property {Array.|null} [sources] Rule sources + * @property {Array.|null} [destinations] Rule destinations + */ - /** - * Constructs a new CreateClientTlsPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a CreateClientTlsPolicyRequest. - * @implements ICreateClientTlsPolicyRequest - * @constructor - * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest=} [properties] Properties to set - */ - function CreateClientTlsPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateClientTlsPolicyRequest parent. - * @member {string} parent - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @instance - */ - CreateClientTlsPolicyRequest.prototype.parent = ""; + /** + * Constructs a new Rule. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy + * @classdesc Represents a Rule. + * @implements IRule + * @constructor + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule=} [properties] Properties to set + */ + function Rule(properties) { + this.sources = []; + 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]]; + } - /** - * CreateClientTlsPolicyRequest clientTlsPolicyId. - * @member {string} clientTlsPolicyId - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @instance - */ - CreateClientTlsPolicyRequest.prototype.clientTlsPolicyId = ""; + /** + * Rule sources. + * @member {Array.} sources + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @instance + */ + Rule.prototype.sources = $util.emptyArray; - /** - * CreateClientTlsPolicyRequest clientTlsPolicy. - * @member {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null|undefined} clientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @instance - */ - CreateClientTlsPolicyRequest.prototype.clientTlsPolicy = null; + /** + * Rule destinations. + * @member {Array.} destinations + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @instance + */ + Rule.prototype.destinations = $util.emptyArray; - /** - * Creates a new CreateClientTlsPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest instance - */ - CreateClientTlsPolicyRequest.create = function create(properties) { - return new CreateClientTlsPolicyRequest(properties); - }; + /** + * Creates a new Rule instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule instance + */ + Rule.create = function create(properties) { + return new Rule(properties); + }; - /** - * Encodes the specified CreateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateClientTlsPolicyRequest.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.clientTlsPolicyId != null && Object.hasOwnProperty.call(message, "clientTlsPolicyId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientTlsPolicyId); - if (message.clientTlsPolicy != null && Object.hasOwnProperty.call(message, "clientTlsPolicy")) - $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.encode(message.clientTlsPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; + /** + * Encodes the specified Rule message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sources != null && message.sources.length) + for (var i = 0; i < message.sources.length; ++i) + $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.encode(message.sources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.destinations != null && message.destinations.length) + for (var i = 0; i < message.destinations.length; ++i) + $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.encode(message.destinations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified CreateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Rule message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.IRule} message Rule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Rule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateClientTlsPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.clientTlsPolicyId = reader.string(); + /** + * Decodes a Rule message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) break; - } - case 3: { - message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.decode(reader, reader.uint32()); + switch (tag >>> 3) { + case 1: { + if (!(message.sources && message.sources.length)) + message.sources = []; + message.sources.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + message.destinations.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a Rule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Rule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a CreateClientTlsPolicyRequest message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateClientTlsPolicyRequest.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.clientTlsPolicyId != null && message.hasOwnProperty("clientTlsPolicyId")) - if (!$util.isString(message.clientTlsPolicyId)) - return "clientTlsPolicyId: string expected"; - if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) { - var error = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify(message.clientTlsPolicy); - if (error) - return "clientTlsPolicy." + error; - } - return null; - }; + /** + * Verifies a Rule message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Rule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sources != null && message.hasOwnProperty("sources")) { + if (!Array.isArray(message.sources)) + return "sources: array expected"; + for (var i = 0; i < message.sources.length; ++i) { + var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.verify(message.sources[i]); + if (error) + return "sources." + error; + } + } + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) { + var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.verify(message.destinations[i]); + if (error) + return "destinations." + error; + } + } + return null; + }; - /** - * Creates a CreateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest - */ - CreateClientTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest) + /** + * Creates a Rule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} Rule + */ + Rule.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule(); + if (object.sources) { + if (!Array.isArray(object.sources)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.sources: array expected"); + message.sources = []; + for (var i = 0; i < object.sources.length; ++i) { + if (typeof object.sources[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.sources: object expected"); + message.sources[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.fromObject(object.sources[i]); + } + } + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) { + if (typeof object.destinations[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.destinations: object expected"); + message.destinations[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.fromObject(object.destinations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Rule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule} message Rule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Rule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.sources = []; + object.destinations = []; + } + if (message.sources && message.sources.length) { + object.sources = []; + for (var j = 0; j < message.sources.length; ++j) + object.sources[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.toObject(message.sources[j], options); + } + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.toObject(message.destinations[j], options); + } return object; - var message = new $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.clientTlsPolicyId != null) - message.clientTlsPolicyId = String(object.clientTlsPolicyId); - if (object.clientTlsPolicy != null) { - if (typeof object.clientTlsPolicy !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest.clientTlsPolicy: object expected"); - message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.fromObject(object.clientTlsPolicy); - } - return message; - }; + }; - /** - * Creates a plain object from a CreateClientTlsPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateClientTlsPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.clientTlsPolicyId = ""; - object.clientTlsPolicy = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.clientTlsPolicyId != null && message.hasOwnProperty("clientTlsPolicyId")) - object.clientTlsPolicyId = message.clientTlsPolicyId; - if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) - object.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.toObject(message.clientTlsPolicy, options); - return object; - }; + /** + * Converts this Rule to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @instance + * @returns {Object.} JSON object + */ + Rule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this CreateClientTlsPolicyRequest to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - CreateClientTlsPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Rule + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Rule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule"; + }; - /** - * Gets the default type url for CreateClientTlsPolicyRequest - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest"; - }; + Rule.Source = (function() { - return CreateClientTlsPolicyRequest; - })(); + /** + * Properties of a Source. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @interface ISource + * @property {Array.|null} [principals] Source principals + * @property {Array.|null} [ipBlocks] Source ipBlocks + */ - v1beta1.UpdateClientTlsPolicyRequest = (function() { + /** + * Constructs a new Source. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @classdesc Represents a Source. + * @implements ISource + * @constructor + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource=} [properties] Properties to set + */ + function Source(properties) { + this.principals = []; + this.ipBlocks = []; + if (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 UpdateClientTlsPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IUpdateClientTlsPolicyRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateClientTlsPolicyRequest updateMask - * @property {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null} [clientTlsPolicy] UpdateClientTlsPolicyRequest clientTlsPolicy - */ + /** + * Source principals. + * @member {Array.} principals + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @instance + */ + Source.prototype.principals = $util.emptyArray; - /** - * Constructs a new UpdateClientTlsPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents an UpdateClientTlsPolicyRequest. - * @implements IUpdateClientTlsPolicyRequest - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest=} [properties] Properties to set - */ - function UpdateClientTlsPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Source ipBlocks. + * @member {Array.} ipBlocks + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @instance + */ + Source.prototype.ipBlocks = $util.emptyArray; - /** - * UpdateClientTlsPolicyRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @instance - */ - UpdateClientTlsPolicyRequest.prototype.updateMask = null; + /** + * Creates a new Source instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source instance + */ + Source.create = function create(properties) { + return new Source(properties); + }; - /** - * UpdateClientTlsPolicyRequest clientTlsPolicy. - * @member {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null|undefined} clientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @instance - */ - UpdateClientTlsPolicyRequest.prototype.clientTlsPolicy = null; + /** + * Encodes the specified Source message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.principals != null && message.principals.length) + for (var i = 0; i < message.principals.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.principals[i]); + if (message.ipBlocks != null && message.ipBlocks.length) + for (var i = 0; i < message.ipBlocks.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.ipBlocks[i]); + return writer; + }; - /** - * Creates a new UpdateClientTlsPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest instance - */ - UpdateClientTlsPolicyRequest.create = function create(properties) { - return new UpdateClientTlsPolicyRequest(properties); - }; + /** + * Encodes the specified Source message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.ISource} message Source message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Source.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Encodes the specified UpdateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateClientTlsPolicyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.clientTlsPolicy != null && Object.hasOwnProperty.call(message, "clientTlsPolicy")) - $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.encode(message.clientTlsPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Decodes a Source message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.principals && message.principals.length)) + message.principals = []; + message.principals.push(reader.string()); + break; + } + case 2: { + if (!(message.ipBlocks && message.ipBlocks.length)) + message.ipBlocks = []; + message.ipBlocks.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified UpdateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Decodes a Source message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Source.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateClientTlsPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; + /** + * Verifies a Source message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Source.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.principals != null && message.hasOwnProperty("principals")) { + if (!Array.isArray(message.principals)) + return "principals: array expected"; + for (var i = 0; i < message.principals.length; ++i) + if (!$util.isString(message.principals[i])) + return "principals: string[] expected"; } - case 2: { - message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.decode(reader, reader.uint32()); - break; + if (message.ipBlocks != null && message.hasOwnProperty("ipBlocks")) { + if (!Array.isArray(message.ipBlocks)) + return "ipBlocks: array expected"; + for (var i = 0; i < message.ipBlocks.length; ++i) + if (!$util.isString(message.ipBlocks[i])) + return "ipBlocks: string[] expected"; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + return null; + }; - /** - * Verifies an UpdateClientTlsPolicyRequest message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateClientTlsPolicyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) { - var error = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify(message.clientTlsPolicy); - if (error) - return "clientTlsPolicy." + error; - } - return null; - }; + /** + * Creates a Source message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} Source + */ + Source.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source(); + if (object.principals) { + if (!Array.isArray(object.principals)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.principals: array expected"); + message.principals = []; + for (var i = 0; i < object.principals.length; ++i) + message.principals[i] = String(object.principals[i]); + } + if (object.ipBlocks) { + if (!Array.isArray(object.ipBlocks)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source.ipBlocks: array expected"); + message.ipBlocks = []; + for (var i = 0; i < object.ipBlocks.length; ++i) + message.ipBlocks[i] = String(object.ipBlocks[i]); + } + return message; + }; - /** - * Creates an UpdateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest - */ - UpdateClientTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest(); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.clientTlsPolicy != null) { - if (typeof object.clientTlsPolicy !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.clientTlsPolicy: object expected"); - message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.fromObject(object.clientTlsPolicy); - } - return message; - }; + /** + * Creates a plain object from a Source message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source} message Source + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Source.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.principals = []; + object.ipBlocks = []; + } + if (message.principals && message.principals.length) { + object.principals = []; + for (var j = 0; j < message.principals.length; ++j) + object.principals[j] = message.principals[j]; + } + if (message.ipBlocks && message.ipBlocks.length) { + object.ipBlocks = []; + for (var j = 0; j < message.ipBlocks.length; ++j) + object.ipBlocks[j] = message.ipBlocks[j]; + } + return object; + }; - /** - * Creates a plain object from an UpdateClientTlsPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateClientTlsPolicyRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.updateMask = null; - object.clientTlsPolicy = null; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) - object.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.toObject(message.clientTlsPolicy, options); - return object; - }; + /** + * Converts this Source to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @instance + * @returns {Object.} JSON object + */ + Source.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this UpdateClientTlsPolicyRequest to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateClientTlsPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for Source + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Source.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Source"; + }; - /** - * Gets the default type url for UpdateClientTlsPolicyRequest - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest"; - }; + return Source; + })(); - return UpdateClientTlsPolicyRequest; - })(); + Rule.Destination = (function() { - v1beta1.DeleteClientTlsPolicyRequest = (function() { + /** + * Properties of a Destination. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @interface IDestination + * @property {Array.|null} [hosts] Destination hosts + * @property {Array.|null} [ports] Destination ports + * @property {Array.|null} [methods] Destination methods + * @property {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch|null} [httpHeaderMatch] Destination httpHeaderMatch + */ - /** - * Properties of a DeleteClientTlsPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IDeleteClientTlsPolicyRequest - * @property {string|null} [name] DeleteClientTlsPolicyRequest name - */ + /** + * Constructs a new Destination. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule + * @classdesc Represents a Destination. + * @implements IDestination + * @constructor + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination=} [properties] Properties to set + */ + function Destination(properties) { + this.hosts = []; + this.ports = []; + this.methods = []; + if (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 DeleteClientTlsPolicyRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a DeleteClientTlsPolicyRequest. - * @implements IDeleteClientTlsPolicyRequest - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest=} [properties] Properties to set - */ - function DeleteClientTlsPolicyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Destination hosts. + * @member {Array.} hosts + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @instance + */ + Destination.prototype.hosts = $util.emptyArray; - /** - * DeleteClientTlsPolicyRequest name. - * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @instance - */ - DeleteClientTlsPolicyRequest.prototype.name = ""; + /** + * Destination ports. + * @member {Array.} ports + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @instance + */ + Destination.prototype.ports = $util.emptyArray; - /** - * Creates a new DeleteClientTlsPolicyRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest instance - */ - DeleteClientTlsPolicyRequest.create = function create(properties) { - return new DeleteClientTlsPolicyRequest(properties); - }; + /** + * Destination methods. + * @member {Array.} methods + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @instance + */ + Destination.prototype.methods = $util.emptyArray; - /** - * Encodes the specified DeleteClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteClientTlsPolicyRequest.encode = function encode(message, writer) { - 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; - }; + /** + * Destination httpHeaderMatch. + * @member {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch|null|undefined} httpHeaderMatch + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @instance + */ + Destination.prototype.httpHeaderMatch = null; - /** - * Encodes the specified DeleteClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Destination instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination instance + */ + Destination.create = function create(properties) { + return new Destination(properties); + }; - /** - * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteClientTlsPolicyRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; + /** + * Encodes the specified Destination message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hosts != null && message.hosts.length) + for (var i = 0; i < message.hosts.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.hosts[i]); + if (message.ports != null && message.ports.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.ports.length; ++i) + writer.uint32(message.ports[i]); + writer.ldelim(); } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteClientTlsPolicyRequest message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteClientTlsPolicyRequest.verify = function verify(message) { - if (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; - }; + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.methods[i]); + if (message.httpHeaderMatch != null && Object.hasOwnProperty.call(message, "httpHeaderMatch")) + $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.encode(message.httpHeaderMatch, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; - /** - * Creates a DeleteClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest - */ - DeleteClientTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * Encodes the specified Destination message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.IDestination} message Destination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Destination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a plain object from a DeleteClientTlsPolicyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteClientTlsPolicyRequest.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; - }; + /** + * Decodes a Destination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.hosts && message.hosts.length)) + message.hosts = []; + message.hosts.push(reader.string()); + break; + } + case 2: { + if (!(message.ports && message.ports.length)) + message.ports = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.ports.push(reader.uint32()); + } else + message.ports.push(reader.uint32()); + break; + } + case 4: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 5: { + message.httpHeaderMatch = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Converts this DeleteClientTlsPolicyRequest to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteClientTlsPolicyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Decodes a Destination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Destination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Gets the default type url for DeleteClientTlsPolicyRequest - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest"; - }; + /** + * Verifies a Destination message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Destination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hosts != null && message.hasOwnProperty("hosts")) { + if (!Array.isArray(message.hosts)) + return "hosts: array expected"; + for (var i = 0; i < message.hosts.length; ++i) + if (!$util.isString(message.hosts[i])) + return "hosts: string[] expected"; + } + if (message.ports != null && message.hasOwnProperty("ports")) { + if (!Array.isArray(message.ports)) + return "ports: array expected"; + for (var i = 0; i < message.ports.length; ++i) + if (!$util.isInteger(message.ports[i])) + return "ports: integer[] expected"; + } + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.httpHeaderMatch != null && message.hasOwnProperty("httpHeaderMatch")) { + var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.verify(message.httpHeaderMatch); + if (error) + return "httpHeaderMatch." + error; + } + return null; + }; - return DeleteClientTlsPolicyRequest; - })(); + /** + * Creates a Destination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} Destination + */ + Destination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination(); + if (object.hosts) { + if (!Array.isArray(object.hosts)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.hosts: array expected"); + message.hosts = []; + for (var i = 0; i < object.hosts.length; ++i) + message.hosts[i] = String(object.hosts[i]); + } + if (object.ports) { + if (!Array.isArray(object.ports)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.ports: array expected"); + message.ports = []; + for (var i = 0; i < object.ports.length; ++i) + message.ports[i] = object.ports[i] >>> 0; + } + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.httpHeaderMatch != null) { + if (typeof object.httpHeaderMatch !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.httpHeaderMatch: object expected"); + message.httpHeaderMatch = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.fromObject(object.httpHeaderMatch); + } + return message; + }; - v1beta1.GrpcEndpoint = (function() { + /** + * Creates a plain object from a Destination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination} message Destination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Destination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.hosts = []; + object.ports = []; + object.methods = []; + } + if (options.defaults) + object.httpHeaderMatch = null; + if (message.hosts && message.hosts.length) { + object.hosts = []; + for (var j = 0; j < message.hosts.length; ++j) + object.hosts[j] = message.hosts[j]; + } + if (message.ports && message.ports.length) { + object.ports = []; + for (var j = 0; j < message.ports.length; ++j) + object.ports[j] = message.ports[j]; + } + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.httpHeaderMatch != null && message.hasOwnProperty("httpHeaderMatch")) + object.httpHeaderMatch = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.toObject(message.httpHeaderMatch, options); + return object; + }; - /** - * Properties of a GrpcEndpoint. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IGrpcEndpoint - * @property {string|null} [targetUri] GrpcEndpoint targetUri - */ + /** + * Converts this Destination to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @instance + * @returns {Object.} JSON object + */ + Destination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new GrpcEndpoint. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a GrpcEndpoint. - * @implements IGrpcEndpoint - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint=} [properties] Properties to set - */ - function GrpcEndpoint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Gets the default type url for Destination + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Destination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination"; + }; - /** - * GrpcEndpoint targetUri. - * @member {string} targetUri - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @instance - */ - GrpcEndpoint.prototype.targetUri = ""; + Destination.HttpHeaderMatch = (function() { - /** - * Creates a new GrpcEndpoint instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint instance - */ - GrpcEndpoint.create = function create(properties) { - return new GrpcEndpoint(properties); - }; + /** + * Properties of a HttpHeaderMatch. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @interface IHttpHeaderMatch + * @property {string|null} [regexMatch] HttpHeaderMatch regexMatch + * @property {string|null} [headerName] HttpHeaderMatch headerName + */ - /** - * Encodes the specified GrpcEndpoint message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint} message GrpcEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GrpcEndpoint.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.targetUri != null && Object.hasOwnProperty.call(message, "targetUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetUri); - return writer; - }; + /** + * Constructs a new HttpHeaderMatch. + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination + * @classdesc Represents a HttpHeaderMatch. + * @implements IHttpHeaderMatch + * @constructor + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch=} [properties] Properties to set + */ + function HttpHeaderMatch(properties) { + if (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 GrpcEndpoint message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint} message GrpcEndpoint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GrpcEndpoint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * HttpHeaderMatch regexMatch. + * @member {string|null|undefined} regexMatch + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @instance + */ + HttpHeaderMatch.prototype.regexMatch = null; - /** - * Decodes a GrpcEndpoint message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GrpcEndpoint.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.targetUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GrpcEndpoint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GrpcEndpoint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * HttpHeaderMatch headerName. + * @member {string} headerName + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @instance + */ + HttpHeaderMatch.prototype.headerName = ""; - /** - * Verifies a GrpcEndpoint message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GrpcEndpoint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.targetUri != null && message.hasOwnProperty("targetUri")) - if (!$util.isString(message.targetUri)) - return "targetUri: string expected"; - return null; - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a GrpcEndpoint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint - */ - GrpcEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint(); - if (object.targetUri != null) - message.targetUri = String(object.targetUri); - return message; - }; + /** + * HttpHeaderMatch type. + * @member {"regexMatch"|undefined} type + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @instance + */ + Object.defineProperty(HttpHeaderMatch.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["regexMatch"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a plain object from a GrpcEndpoint message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {google.cloud.networksecurity.v1beta1.GrpcEndpoint} message GrpcEndpoint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GrpcEndpoint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.targetUri = ""; - if (message.targetUri != null && message.hasOwnProperty("targetUri")) - object.targetUri = message.targetUri; - return object; - }; + /** + * Creates a new HttpHeaderMatch instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch instance + */ + HttpHeaderMatch.create = function create(properties) { + return new HttpHeaderMatch(properties); + }; - /** - * Converts this GrpcEndpoint to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @instance - * @returns {Object.} JSON object - */ - GrpcEndpoint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Encodes the specified HttpHeaderMatch message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch} message HttpHeaderMatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpHeaderMatch.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headerName != null && Object.hasOwnProperty.call(message, "headerName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.headerName); + if (message.regexMatch != null && Object.hasOwnProperty.call(message, "regexMatch")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.regexMatch); + return writer; + }; - /** - * Gets the default type url for GrpcEndpoint - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GrpcEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GrpcEndpoint"; - }; + /** + * Encodes the specified HttpHeaderMatch message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.IHttpHeaderMatch} message HttpHeaderMatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpHeaderMatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - return GrpcEndpoint; - })(); + /** + * Decodes a HttpHeaderMatch message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpHeaderMatch.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.regexMatch = reader.string(); + break; + } + case 1: { + message.headerName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - v1beta1.ValidationCA = (function() { + /** + * Decodes a HttpHeaderMatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpHeaderMatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Properties of a ValidationCA. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IValidationCA - * @property {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null} [grpcEndpoint] ValidationCA grpcEndpoint - * @property {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null} [certificateProviderInstance] ValidationCA certificateProviderInstance - */ + /** + * Verifies a HttpHeaderMatch message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpHeaderMatch.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.regexMatch != null && message.hasOwnProperty("regexMatch")) { + properties.type = 1; + if (!$util.isString(message.regexMatch)) + return "regexMatch: string expected"; + } + if (message.headerName != null && message.hasOwnProperty("headerName")) + if (!$util.isString(message.headerName)) + return "headerName: string expected"; + return null; + }; - /** - * Constructs a new ValidationCA. + /** + * Creates a HttpHeaderMatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} HttpHeaderMatch + */ + HttpHeaderMatch.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch(); + if (object.regexMatch != null) + message.regexMatch = String(object.regexMatch); + if (object.headerName != null) + message.headerName = String(object.headerName); + return message; + }; + + /** + * Creates a plain object from a HttpHeaderMatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch} message HttpHeaderMatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpHeaderMatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.headerName = ""; + if (message.headerName != null && message.hasOwnProperty("headerName")) + object.headerName = message.headerName; + if (message.regexMatch != null && message.hasOwnProperty("regexMatch")) { + object.regexMatch = message.regexMatch; + if (options.oneofs) + object.type = "regexMatch"; + } + return object; + }; + + /** + * Converts this HttpHeaderMatch to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @instance + * @returns {Object.} JSON object + */ + HttpHeaderMatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpHeaderMatch + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpHeaderMatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch"; + }; + + return HttpHeaderMatch; + })(); + + return Destination; + })(); + + return Rule; + })(); + + /** + * Action enum. + * @name google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Action + * @enum {number} + * @property {number} ACTION_UNSPECIFIED=0 ACTION_UNSPECIFIED value + * @property {number} ALLOW=1 ALLOW value + * @property {number} DENY=2 DENY value + */ + AuthorizationPolicy.Action = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "DENY"] = 2; + return values; + })(); + + return AuthorizationPolicy; + })(); + + v1beta1.ListAuthorizationPoliciesRequest = (function() { + + /** + * Properties of a ListAuthorizationPoliciesRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ValidationCA. - * @implements IValidationCA + * @interface IListAuthorizationPoliciesRequest + * @property {string|null} [parent] ListAuthorizationPoliciesRequest parent + * @property {number|null} [pageSize] ListAuthorizationPoliciesRequest pageSize + * @property {string|null} [pageToken] ListAuthorizationPoliciesRequest pageToken + */ + + /** + * Constructs a new ListAuthorizationPoliciesRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a ListAuthorizationPoliciesRequest. + * @implements IListAuthorizationPoliciesRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.IValidationCA=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest=} [properties] Properties to set */ - function ValidationCA(properties) { + function ListAuthorizationPoliciesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13836,105 +14021,105 @@ } /** - * ValidationCA grpcEndpoint. - * @member {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null|undefined} grpcEndpoint - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * ListAuthorizationPoliciesRequest parent. + * @member {string} parent + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @instance */ - ValidationCA.prototype.grpcEndpoint = null; + ListAuthorizationPoliciesRequest.prototype.parent = ""; /** - * ValidationCA certificateProviderInstance. - * @member {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null|undefined} certificateProviderInstance - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * ListAuthorizationPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @instance */ - ValidationCA.prototype.certificateProviderInstance = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ListAuthorizationPoliciesRequest.prototype.pageSize = 0; /** - * ValidationCA type. - * @member {"grpcEndpoint"|"certificateProviderInstance"|undefined} type - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * ListAuthorizationPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @instance */ - Object.defineProperty(ValidationCA.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["grpcEndpoint", "certificateProviderInstance"]), - set: $util.oneOfSetter($oneOfFields) - }); + ListAuthorizationPoliciesRequest.prototype.pageToken = ""; /** - * Creates a new ValidationCA instance using the specified properties. + * Creates a new ListAuthorizationPoliciesRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IValidationCA=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA instance + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest instance */ - ValidationCA.create = function create(properties) { - return new ValidationCA(properties); + ListAuthorizationPoliciesRequest.create = function create(properties) { + return new ListAuthorizationPoliciesRequest(properties); }; /** - * Encodes the specified ValidationCA message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ValidationCA.verify|verify} messages. + * Encodes the specified ListAuthorizationPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IValidationCA} message ValidationCA message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} message ListAuthorizationPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationCA.encode = function encode(message, writer) { + ListAuthorizationPoliciesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.grpcEndpoint != null && Object.hasOwnProperty.call(message, "grpcEndpoint")) - $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.encode(message.grpcEndpoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.certificateProviderInstance != null && Object.hasOwnProperty.call(message, "certificateProviderInstance")) - $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.encode(message.certificateProviderInstance, 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.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 ValidationCA message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ValidationCA.verify|verify} messages. + * Encodes the specified ListAuthorizationPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IValidationCA} message ValidationCA message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} message ListAuthorizationPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidationCA.encodeDelimited = function encodeDelimited(message, writer) { + ListAuthorizationPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ValidationCA message from the specified reader or buffer. + * Decodes a ListAuthorizationPoliciesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationCA.decode = function decode(reader, length, error) { + ListAuthorizationPoliciesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ValidationCA(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } case 2: { - message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.decode(reader, reader.uint32()); + message.pageSize = reader.int32(); break; } case 3: { - message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.decode(reader, reader.uint32()); + message.pageToken = reader.string(); break; } default: @@ -13946,152 +14131,141 @@ }; /** - * Decodes a ValidationCA message from the specified reader or buffer, length delimited. + * Decodes a ListAuthorizationPoliciesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidationCA.decodeDelimited = function decodeDelimited(reader) { + ListAuthorizationPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ValidationCA message. + * Verifies a ListAuthorizationPoliciesRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ValidationCA.verify = function verify(message) { + ListAuthorizationPoliciesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { - properties.type = 1; - { - var error = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify(message.grpcEndpoint); - if (error) - return "grpcEndpoint." + error; - } - } - if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify(message.certificateProviderInstance); - if (error) - return "certificateProviderInstance." + error; - } - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; return null; }; /** - * Creates a ValidationCA message from a plain object. Also converts values to their respective internal types. + * Creates a ListAuthorizationPoliciesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} ListAuthorizationPoliciesRequest */ - ValidationCA.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ValidationCA) + ListAuthorizationPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ValidationCA(); - if (object.grpcEndpoint != null) { - if (typeof object.grpcEndpoint !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ValidationCA.grpcEndpoint: object expected"); - message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.fromObject(object.grpcEndpoint); - } - if (object.certificateProviderInstance != null) { - if (typeof object.certificateProviderInstance !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ValidationCA.certificateProviderInstance: object expected"); - message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.fromObject(object.certificateProviderInstance); - } + var message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest(); + 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 ValidationCA message. Also converts values to other types if specified. + * Creates a plain object from a ListAuthorizationPoliciesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ValidationCA} message ValidationCA + * @param {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest} message ListAuthorizationPoliciesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ValidationCA.toObject = function toObject(message, options) { + ListAuthorizationPoliciesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { - object.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.toObject(message.grpcEndpoint, options); - if (options.oneofs) - object.type = "grpcEndpoint"; - } - if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { - object.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.toObject(message.certificateProviderInstance, options); - if (options.oneofs) - object.type = "certificateProviderInstance"; + 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 ValidationCA to JSON. + * Converts this ListAuthorizationPoliciesRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @instance * @returns {Object.} JSON object */ - ValidationCA.prototype.toJSON = function toJSON() { + ListAuthorizationPoliciesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ValidationCA + * Gets the default type url for ListAuthorizationPoliciesRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ValidationCA.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAuthorizationPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ValidationCA"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest"; }; - return ValidationCA; + return ListAuthorizationPoliciesRequest; })(); - v1beta1.CertificateProviderInstance = (function() { + v1beta1.ListAuthorizationPoliciesResponse = (function() { /** - * Properties of a CertificateProviderInstance. + * Properties of a ListAuthorizationPoliciesResponse. * @memberof google.cloud.networksecurity.v1beta1 - * @interface ICertificateProviderInstance - * @property {string|null} [pluginInstance] CertificateProviderInstance pluginInstance + * @interface IListAuthorizationPoliciesResponse + * @property {Array.|null} [authorizationPolicies] ListAuthorizationPoliciesResponse authorizationPolicies + * @property {string|null} [nextPageToken] ListAuthorizationPoliciesResponse nextPageToken */ /** - * Constructs a new CertificateProviderInstance. + * Constructs a new ListAuthorizationPoliciesResponse. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a CertificateProviderInstance. - * @implements ICertificateProviderInstance + * @classdesc Represents a ListAuthorizationPoliciesResponse. + * @implements IListAuthorizationPoliciesResponse * @constructor - * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse=} [properties] Properties to set */ - function CertificateProviderInstance(properties) { + function ListAuthorizationPoliciesResponse(properties) { + this.authorizationPolicies = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14099,77 +14273,94 @@ } /** - * CertificateProviderInstance pluginInstance. - * @member {string} pluginInstance - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * ListAuthorizationPoliciesResponse authorizationPolicies. + * @member {Array.} authorizationPolicies + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @instance */ - CertificateProviderInstance.prototype.pluginInstance = ""; + ListAuthorizationPoliciesResponse.prototype.authorizationPolicies = $util.emptyArray; /** - * Creates a new CertificateProviderInstance instance using the specified properties. + * ListAuthorizationPoliciesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse + * @instance + */ + ListAuthorizationPoliciesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAuthorizationPoliciesResponse instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance instance + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse instance */ - CertificateProviderInstance.create = function create(properties) { - return new CertificateProviderInstance(properties); + ListAuthorizationPoliciesResponse.create = function create(properties) { + return new ListAuthorizationPoliciesResponse(properties); }; /** - * Encodes the specified CertificateProviderInstance message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify|verify} messages. + * Encodes the specified ListAuthorizationPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance} message CertificateProviderInstance message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse} message ListAuthorizationPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CertificateProviderInstance.encode = function encode(message, writer) { + ListAuthorizationPoliciesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.pluginInstance != null && Object.hasOwnProperty.call(message, "pluginInstance")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pluginInstance); + if (message.authorizationPolicies != null && message.authorizationPolicies.length) + for (var i = 0; i < message.authorizationPolicies.length; ++i) + $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.encode(message.authorizationPolicies[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 CertificateProviderInstance message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify|verify} messages. + * Encodes the specified ListAuthorizationPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance} message CertificateProviderInstance message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesResponse} message ListAuthorizationPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CertificateProviderInstance.encodeDelimited = function encodeDelimited(message, writer) { + ListAuthorizationPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CertificateProviderInstance message from the specified reader or buffer. + * Decodes a ListAuthorizationPoliciesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CertificateProviderInstance.decode = function decode(reader, length, error) { + ListAuthorizationPoliciesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.pluginInstance = reader.string(); + if (!(message.authorizationPolicies && message.authorizationPolicies.length)) + message.authorizationPolicies = []; + message.authorizationPolicies.push($root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -14181,123 +14372,148 @@ }; /** - * Decodes a CertificateProviderInstance message from the specified reader or buffer, length delimited. + * Decodes a ListAuthorizationPoliciesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CertificateProviderInstance.decodeDelimited = function decodeDelimited(reader) { + ListAuthorizationPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CertificateProviderInstance message. + * Verifies a ListAuthorizationPoliciesResponse message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CertificateProviderInstance.verify = function verify(message) { + ListAuthorizationPoliciesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.pluginInstance != null && message.hasOwnProperty("pluginInstance")) - if (!$util.isString(message.pluginInstance)) - return "pluginInstance: string expected"; + if (message.authorizationPolicies != null && message.hasOwnProperty("authorizationPolicies")) { + if (!Array.isArray(message.authorizationPolicies)) + return "authorizationPolicies: array expected"; + for (var i = 0; i < message.authorizationPolicies.length; ++i) { + var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify(message.authorizationPolicies[i]); + if (error) + return "authorizationPolicies." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a CertificateProviderInstance message from a plain object. Also converts values to their respective internal types. + * Creates a ListAuthorizationPoliciesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance + * @returns {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} ListAuthorizationPoliciesResponse */ - CertificateProviderInstance.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance) + ListAuthorizationPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance(); - if (object.pluginInstance != null) - message.pluginInstance = String(object.pluginInstance); + var message = new $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse(); + if (object.authorizationPolicies) { + if (!Array.isArray(object.authorizationPolicies)) + throw TypeError(".google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.authorizationPolicies: array expected"); + message.authorizationPolicies = []; + for (var i = 0; i < object.authorizationPolicies.length; ++i) { + if (typeof object.authorizationPolicies[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse.authorizationPolicies: object expected"); + message.authorizationPolicies[i] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.fromObject(object.authorizationPolicies[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CertificateProviderInstance message. Also converts values to other types if specified. + * Creates a plain object from a ListAuthorizationPoliciesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} message CertificateProviderInstance + * @param {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} message ListAuthorizationPoliciesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CertificateProviderInstance.toObject = function toObject(message, options) { + ListAuthorizationPoliciesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.authorizationPolicies = []; if (options.defaults) - object.pluginInstance = ""; - if (message.pluginInstance != null && message.hasOwnProperty("pluginInstance")) - object.pluginInstance = message.pluginInstance; + object.nextPageToken = ""; + if (message.authorizationPolicies && message.authorizationPolicies.length) { + object.authorizationPolicies = []; + for (var j = 0; j < message.authorizationPolicies.length; ++j) + object.authorizationPolicies[j] = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.toObject(message.authorizationPolicies[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CertificateProviderInstance to JSON. + * Converts this ListAuthorizationPoliciesResponse to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @instance * @returns {Object.} JSON object */ - CertificateProviderInstance.prototype.toJSON = function toJSON() { + ListAuthorizationPoliciesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CertificateProviderInstance + * Gets the default type url for ListAuthorizationPoliciesResponse * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CertificateProviderInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListAuthorizationPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CertificateProviderInstance"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse"; }; - return CertificateProviderInstance; + return ListAuthorizationPoliciesResponse; })(); - v1beta1.CertificateProvider = (function() { + v1beta1.GetAuthorizationPolicyRequest = (function() { /** - * Properties of a CertificateProvider. + * Properties of a GetAuthorizationPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @interface ICertificateProvider - * @property {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null} [grpcEndpoint] CertificateProvider grpcEndpoint - * @property {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null} [certificateProviderInstance] CertificateProvider certificateProviderInstance + * @interface IGetAuthorizationPolicyRequest + * @property {string|null} [name] GetAuthorizationPolicyRequest name */ /** - * Constructs a new CertificateProvider. + * Constructs a new GetAuthorizationPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a CertificateProvider. - * @implements ICertificateProvider + * @classdesc Represents a GetAuthorizationPolicyRequest. + * @implements IGetAuthorizationPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest=} [properties] Properties to set */ - function CertificateProvider(properties) { + function GetAuthorizationPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14305,105 +14521,77 @@ } /** - * CertificateProvider grpcEndpoint. - * @member {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null|undefined} grpcEndpoint - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider - * @instance - */ - CertificateProvider.prototype.grpcEndpoint = null; - - /** - * CertificateProvider certificateProviderInstance. - * @member {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null|undefined} certificateProviderInstance - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider - * @instance - */ - CertificateProvider.prototype.certificateProviderInstance = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CertificateProvider type. - * @member {"grpcEndpoint"|"certificateProviderInstance"|undefined} type - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * GetAuthorizationPolicyRequest name. + * @member {string} name + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @instance */ - Object.defineProperty(CertificateProvider.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["grpcEndpoint", "certificateProviderInstance"]), - set: $util.oneOfSetter($oneOfFields) - }); + GetAuthorizationPolicyRequest.prototype.name = ""; /** - * Creates a new CertificateProvider instance using the specified properties. + * Creates a new GetAuthorizationPolicyRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider instance + * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest instance */ - CertificateProvider.create = function create(properties) { - return new CertificateProvider(properties); + GetAuthorizationPolicyRequest.create = function create(properties) { + return new GetAuthorizationPolicyRequest(properties); }; /** - * Encodes the specified CertificateProvider message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProvider.verify|verify} messages. + * Encodes the specified GetAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider} message CertificateProvider message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} message GetAuthorizationPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CertificateProvider.encode = function encode(message, writer) { + GetAuthorizationPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.grpcEndpoint != null && Object.hasOwnProperty.call(message, "grpcEndpoint")) - $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.encode(message.grpcEndpoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.certificateProviderInstance != null && Object.hasOwnProperty.call(message, "certificateProviderInstance")) - $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.encode(message.certificateProviderInstance, writer.uint32(/* id 3, wireType 2 =*/26).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 CertificateProvider message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProvider.verify|verify} messages. + * Encodes the specified GetAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider} message CertificateProvider message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} message GetAuthorizationPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CertificateProvider.encodeDelimited = function encodeDelimited(message, writer) { + GetAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CertificateProvider message from the specified reader or buffer. + * Decodes a GetAuthorizationPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider + * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CertificateProvider.decode = function decode(reader, length, error) { + GetAuthorizationPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CertificateProvider(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 2: { - message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.decode(reader, reader.uint32()); - break; - } - case 3: { - message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.decode(reader, reader.uint32()); + case 1: { + message.name = reader.string(); break; } default: @@ -14415,158 +14603,124 @@ }; /** - * Decodes a CertificateProvider message from the specified reader or buffer, length delimited. + * Decodes a GetAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider + * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CertificateProvider.decodeDelimited = function decodeDelimited(reader) { + GetAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CertificateProvider message. + * Verifies a GetAuthorizationPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CertificateProvider.verify = function verify(message) { + GetAuthorizationPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { - properties.type = 1; - { - var error = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify(message.grpcEndpoint); - if (error) - return "grpcEndpoint." + error; - } - } - if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { - if (properties.type === 1) - return "type: multiple values"; - properties.type = 1; - { - var error = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify(message.certificateProviderInstance); - if (error) - return "certificateProviderInstance." + error; - } - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CertificateProvider message from a plain object. Also converts values to their respective internal types. + * Creates a GetAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider + * @returns {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} GetAuthorizationPolicyRequest */ - CertificateProvider.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.CertificateProvider) + GetAuthorizationPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.CertificateProvider(); - if (object.grpcEndpoint != null) { - if (typeof object.grpcEndpoint !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.CertificateProvider.grpcEndpoint: object expected"); - message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.fromObject(object.grpcEndpoint); - } - if (object.certificateProviderInstance != null) { - if (typeof object.certificateProviderInstance !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.CertificateProvider.certificateProviderInstance: object expected"); - message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.fromObject(object.certificateProviderInstance); - } + var message = new $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CertificateProvider message. Also converts values to other types if specified. + * Creates a plain object from a GetAuthorizationPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.CertificateProvider} message CertificateProvider + * @param {google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest} message GetAuthorizationPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CertificateProvider.toObject = function toObject(message, options) { + GetAuthorizationPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { - object.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.toObject(message.grpcEndpoint, options); - if (options.oneofs) - object.type = "grpcEndpoint"; - } - if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { - object.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.toObject(message.certificateProviderInstance, options); - if (options.oneofs) - object.type = "certificateProviderInstance"; - } + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CertificateProvider to JSON. + * Converts this GetAuthorizationPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @instance * @returns {Object.} JSON object */ - CertificateProvider.prototype.toJSON = function toJSON() { + GetAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CertificateProvider + * Gets the default type url for GetAuthorizationPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @memberof google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CertificateProvider.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CertificateProvider"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest"; }; - return CertificateProvider; + return GetAuthorizationPolicyRequest; })(); - v1beta1.OperationMetadata = (function() { + v1beta1.CreateAuthorizationPolicyRequest = (function() { /** - * Properties of an OperationMetadata. + * Properties of a CreateAuthorizationPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusMessage] OperationMetadata statusMessage - * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * @interface ICreateAuthorizationPolicyRequest + * @property {string|null} [parent] CreateAuthorizationPolicyRequest parent + * @property {string|null} [authorizationPolicyId] CreateAuthorizationPolicyRequest authorizationPolicyId + * @property {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null} [authorizationPolicy] CreateAuthorizationPolicyRequest authorizationPolicy */ /** - * Constructs a new OperationMetadata. + * Constructs a new CreateAuthorizationPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata + * @classdesc Represents a CreateAuthorizationPolicyRequest. + * @implements ICreateAuthorizationPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest=} [properties] Properties to set */ - function OperationMetadata(properties) { + function CreateAuthorizationPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14574,161 +14728,105 @@ } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * CreateAuthorizationPolicyRequest parent. + * @member {string} parent + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @instance */ - OperationMetadata.prototype.createTime = null; + CreateAuthorizationPolicyRequest.prototype.parent = ""; /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * CreateAuthorizationPolicyRequest authorizationPolicyId. + * @member {string} authorizationPolicyId + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @instance */ - OperationMetadata.prototype.endTime = null; + CreateAuthorizationPolicyRequest.prototype.authorizationPolicyId = ""; /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * CreateAuthorizationPolicyRequest authorizationPolicy. + * @member {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null|undefined} authorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @instance */ - OperationMetadata.prototype.target = ""; + CreateAuthorizationPolicyRequest.prototype.authorizationPolicy = null; /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata - * @instance + * Creates a new CreateAuthorizationPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest instance */ - OperationMetadata.prototype.verb = ""; + CreateAuthorizationPolicyRequest.create = function create(properties) { + return new CreateAuthorizationPolicyRequest(properties); + }; /** - * OperationMetadata statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.statusMessage = ""; - - /** - * OperationMetadata requestedCancellation. - * @member {boolean} requestedCancellation - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.requestedCancellation = false; - - /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.apiVersion = ""; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata - * @static - * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} message CreateAuthorizationPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encode = function encode(message, writer) { + CreateAuthorizationPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - 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.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); - if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.authorizationPolicyId != null && Object.hasOwnProperty.call(message, "authorizationPolicyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.authorizationPolicyId); + if (message.authorizationPolicy != null && Object.hasOwnProperty.call(message, "authorizationPolicy")) + $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.encode(message.authorizationPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.OperationMetadata.verify|verify} messages. + * Encodes the specified CreateAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} message CreateAuthorizationPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CreateAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. + * Decodes a CreateAuthorizationPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata + * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decode = function decode(reader, length, error) { + CreateAuthorizationPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.OperationMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.authorizationPolicyId = reader.string(); break; } case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusMessage = reader.string(); - break; - } - case 6: { - message.requestedCancellation = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); + message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.decode(reader, reader.uint32()); break; } default: @@ -14740,811 +14838,689 @@ }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * Decodes a CreateAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata + * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + CreateAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OperationMetadata message. + * Verifies a CreateAuthorizationPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OperationMetadata.verify = function verify(message) { + CreateAuthorizationPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - 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 (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.authorizationPolicyId != null && message.hasOwnProperty("authorizationPolicyId")) + if (!$util.isString(message.authorizationPolicyId)) + return "authorizationPolicyId: string expected"; + if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) { + var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify(message.authorizationPolicy); if (error) - return "endTime." + error; + return "authorizationPolicy." + error; } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - if (typeof message.requestedCancellation !== "boolean") - return "requestedCancellation: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; return null; }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata + * @returns {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} CreateAuthorizationPolicyRequest */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.OperationMetadata) + CreateAuthorizationPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.OperationMetadata.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.networksecurity.v1beta1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + var message = new $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.authorizationPolicyId != null) + message.authorizationPolicyId = String(object.authorizationPolicyId); + if (object.authorizationPolicy != null) { + if (typeof object.authorizationPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest.authorizationPolicy: object expected"); + message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.fromObject(object.authorizationPolicy); } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.requestedCancellation != null) - message.requestedCancellation = Boolean(object.requestedCancellation); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); return message; }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CreateAuthorizationPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.OperationMetadata} message OperationMetadata + * @param {google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest} message CreateAuthorizationPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OperationMetadata.toObject = function toObject(message, options) { + CreateAuthorizationPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusMessage = ""; - object.requestedCancellation = false; - object.apiVersion = ""; + object.parent = ""; + object.authorizationPolicyId = ""; + object.authorizationPolicy = 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.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) - object.requestedCancellation = message.requestedCancellation; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.authorizationPolicyId != null && message.hasOwnProperty("authorizationPolicyId")) + object.authorizationPolicyId = message.authorizationPolicyId; + if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) + object.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.toObject(message.authorizationPolicy, options); return object; }; /** - * Converts this OperationMetadata to JSON. + * Converts this CreateAuthorizationPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @instance * @returns {Object.} JSON object */ - OperationMetadata.prototype.toJSON = function toJSON() { + CreateAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OperationMetadata + * Gets the default type url for CreateAuthorizationPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @memberof google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.OperationMetadata"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest"; }; - return OperationMetadata; + return CreateAuthorizationPolicyRequest; })(); - v1beta1.NetworkSecurity = (function() { + v1beta1.UpdateAuthorizationPolicyRequest = (function() { /** - * Constructs a new NetworkSecurity service. + * Properties of an UpdateAuthorizationPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a NetworkSecurity - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @interface IUpdateAuthorizationPolicyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAuthorizationPolicyRequest updateMask + * @property {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null} [authorizationPolicy] UpdateAuthorizationPolicyRequest authorizationPolicy */ - function NetworkSecurity(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (NetworkSecurity.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetworkSecurity; /** - * Creates new NetworkSecurity service using the specified rpc implementation. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @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 {NetworkSecurity} RPC service. Useful where requests and/or responses are streamed. + * Constructs a new UpdateAuthorizationPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents an UpdateAuthorizationPolicyRequest. + * @implements IUpdateAuthorizationPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest=} [properties] Properties to set */ - NetworkSecurity.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + function UpdateAuthorizationPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|listAuthorizationPolicies}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef ListAuthorizationPoliciesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} [response] ListAuthorizationPoliciesResponse + * UpdateAuthorizationPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @instance */ + UpdateAuthorizationPolicyRequest.prototype.updateMask = null; /** - * Calls ListAuthorizationPolicies. - * @function listAuthorizationPolicies - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * UpdateAuthorizationPolicyRequest authorizationPolicy. + * @member {google.cloud.networksecurity.v1beta1.IAuthorizationPolicy|null|undefined} authorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest * @instance - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} request ListAuthorizationPoliciesRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.ListAuthorizationPoliciesCallback} callback Node-style callback called with the error, if any, and ListAuthorizationPoliciesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(NetworkSecurity.prototype.listAuthorizationPolicies = function listAuthorizationPolicies(request, callback) { - return this.rpcCall(listAuthorizationPolicies, $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest, $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse, request, callback); - }, "name", { value: "ListAuthorizationPolicies" }); + UpdateAuthorizationPolicyRequest.prototype.authorizationPolicy = null; /** - * Calls ListAuthorizationPolicies. - * @function listAuthorizationPolicies - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} request ListAuthorizationPoliciesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new UpdateAuthorizationPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest instance */ + UpdateAuthorizationPolicyRequest.create = function create(properties) { + return new UpdateAuthorizationPolicyRequest(properties); + }; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|getAuthorizationPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef GetAuthorizationPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} [response] AuthorizationPolicy + * Encodes the specified UpdateAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} message UpdateAuthorizationPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UpdateAuthorizationPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authorizationPolicy != null && Object.hasOwnProperty.call(message, "authorizationPolicy")) + $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.encode(message.authorizationPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; /** - * Calls GetAuthorizationPolicy. - * @function getAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} request GetAuthorizationPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.GetAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and AuthorizationPolicy - * @returns {undefined} - * @variation 1 + * Encodes the specified UpdateAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} message UpdateAuthorizationPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(NetworkSecurity.prototype.getAuthorizationPolicy = function getAuthorizationPolicy(request, callback) { - return this.rpcCall(getAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest, $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy, request, callback); - }, "name", { value: "GetAuthorizationPolicy" }); + UpdateAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls GetAuthorizationPolicy. - * @function getAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} request GetAuthorizationPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an UpdateAuthorizationPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateAuthorizationPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|createAuthorizationPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef CreateAuthorizationPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes an UpdateAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UpdateAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls CreateAuthorizationPolicy. - * @function createAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} request CreateAuthorizationPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies an UpdateAuthorizationPolicyRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(NetworkSecurity.prototype.createAuthorizationPolicy = function createAuthorizationPolicy(request, callback) { - return this.rpcCall(createAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateAuthorizationPolicy" }); + UpdateAuthorizationPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) { + var error = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.verify(message.authorizationPolicy); + if (error) + return "authorizationPolicy." + error; + } + return null; + }; /** - * Calls CreateAuthorizationPolicy. - * @function createAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} request CreateAuthorizationPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an UpdateAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} UpdateAuthorizationPolicyRequest */ + UpdateAuthorizationPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.authorizationPolicy != null) { + if (typeof object.authorizationPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest.authorizationPolicy: object expected"); + message.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.fromObject(object.authorizationPolicy); + } + return message; + }; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|updateAuthorizationPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef UpdateAuthorizationPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from an UpdateAuthorizationPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest} message UpdateAuthorizationPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + UpdateAuthorizationPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.authorizationPolicy = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.authorizationPolicy != null && message.hasOwnProperty("authorizationPolicy")) + object.authorizationPolicy = $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.toObject(message.authorizationPolicy, options); + return object; + }; /** - * Calls UpdateAuthorizationPolicy. - * @function updateAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * Converts this UpdateAuthorizationPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest * @instance - * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} request UpdateAuthorizationPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(NetworkSecurity.prototype.updateAuthorizationPolicy = function updateAuthorizationPolicy(request, callback) { - return this.rpcCall(updateAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateAuthorizationPolicy" }); + UpdateAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateAuthorizationPolicy. - * @function updateAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} request UpdateAuthorizationPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for UpdateAuthorizationPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + UpdateAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest"; + }; + + return UpdateAuthorizationPolicyRequest; + })(); + + v1beta1.DeleteAuthorizationPolicyRequest = (function() { /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|deleteAuthorizationPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef DeleteAuthorizationPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of a DeleteAuthorizationPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IDeleteAuthorizationPolicyRequest + * @property {string|null} [name] DeleteAuthorizationPolicyRequest name */ /** - * Calls DeleteAuthorizationPolicy. - * @function deleteAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} request DeleteAuthorizationPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new DeleteAuthorizationPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a DeleteAuthorizationPolicyRequest. + * @implements IDeleteAuthorizationPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest=} [properties] Properties to set */ - Object.defineProperty(NetworkSecurity.prototype.deleteAuthorizationPolicy = function deleteAuthorizationPolicy(request, callback) { - return this.rpcCall(deleteAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteAuthorizationPolicy" }); + function DeleteAuthorizationPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls DeleteAuthorizationPolicy. - * @function deleteAuthorizationPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * DeleteAuthorizationPolicyRequest name. + * @member {string} name + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest * @instance - * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} request DeleteAuthorizationPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + DeleteAuthorizationPolicyRequest.prototype.name = ""; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|listServerTlsPolicies}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef ListServerTlsPoliciesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} [response] ListServerTlsPoliciesResponse + * Creates a new DeleteAuthorizationPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest instance */ + DeleteAuthorizationPolicyRequest.create = function create(properties) { + return new DeleteAuthorizationPolicyRequest(properties); + }; /** - * Calls ListServerTlsPolicies. - * @function listServerTlsPolicies - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} request ListServerTlsPoliciesRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.ListServerTlsPoliciesCallback} callback Node-style callback called with the error, if any, and ListServerTlsPoliciesResponse - * @returns {undefined} - * @variation 1 + * Encodes the specified DeleteAuthorizationPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} message DeleteAuthorizationPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(NetworkSecurity.prototype.listServerTlsPolicies = function listServerTlsPolicies(request, callback) { - return this.rpcCall(listServerTlsPolicies, $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest, $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse, request, callback); - }, "name", { value: "ListServerTlsPolicies" }); + DeleteAuthorizationPolicyRequest.encode = function encode(message, writer) { + 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; + }; /** - * Calls ListServerTlsPolicies. - * @function listServerTlsPolicies - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} request ListServerTlsPoliciesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Encodes the specified DeleteAuthorizationPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} message DeleteAuthorizationPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + DeleteAuthorizationPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|getServerTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef GetServerTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} [response] ServerTlsPolicy + * Decodes a DeleteAuthorizationPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + DeleteAuthorizationPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Calls GetServerTlsPolicy. - * @function getServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} request GetServerTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.GetServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and ServerTlsPolicy - * @returns {undefined} - * @variation 1 + * Decodes a DeleteAuthorizationPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Object.defineProperty(NetworkSecurity.prototype.getServerTlsPolicy = function getServerTlsPolicy(request, callback) { - return this.rpcCall(getServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest, $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy, request, callback); - }, "name", { value: "GetServerTlsPolicy" }); + DeleteAuthorizationPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetServerTlsPolicy. - * @function getServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} request GetServerTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Verifies a DeleteAuthorizationPolicyRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ + DeleteAuthorizationPolicyRequest.verify = function verify(message) { + if (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; + }; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|createServerTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef CreateServerTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a DeleteAuthorizationPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} DeleteAuthorizationPolicyRequest */ + DeleteAuthorizationPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; /** - * Calls CreateServerTlsPolicy. - * @function createServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} request CreateServerTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Creates a plain object from a DeleteAuthorizationPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest} message DeleteAuthorizationPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - Object.defineProperty(NetworkSecurity.prototype.createServerTlsPolicy = function createServerTlsPolicy(request, callback) { - return this.rpcCall(createServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateServerTlsPolicy" }); + DeleteAuthorizationPolicyRequest.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; + }; /** - * Calls CreateServerTlsPolicy. - * @function createServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * Converts this DeleteAuthorizationPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest * @instance - * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} request CreateServerTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * @returns {Object.} JSON object */ + DeleteAuthorizationPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|updateServerTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef UpdateServerTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Gets the default type url for DeleteAuthorizationPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + DeleteAuthorizationPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest"; + }; - /** - * Calls UpdateServerTlsPolicy. - * @function updateServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} request UpdateServerTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetworkSecurity.prototype.updateServerTlsPolicy = function updateServerTlsPolicy(request, callback) { - return this.rpcCall(updateServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateServerTlsPolicy" }); + return DeleteAuthorizationPolicyRequest; + })(); - /** - * Calls UpdateServerTlsPolicy. - * @function updateServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} request UpdateServerTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + v1beta1.ClientTlsPolicy = (function() { /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|deleteServerTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef DeleteServerTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Properties of a ClientTlsPolicy. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IClientTlsPolicy + * @property {string|null} [name] ClientTlsPolicy name + * @property {string|null} [description] ClientTlsPolicy description + * @property {google.protobuf.ITimestamp|null} [createTime] ClientTlsPolicy createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ClientTlsPolicy updateTime + * @property {Object.|null} [labels] ClientTlsPolicy labels + * @property {string|null} [sni] ClientTlsPolicy sni + * @property {google.cloud.networksecurity.v1beta1.ICertificateProvider|null} [clientCertificate] ClientTlsPolicy clientCertificate + * @property {Array.|null} [serverValidationCa] ClientTlsPolicy serverValidationCa */ /** - * Calls DeleteServerTlsPolicy. - * @function deleteServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} request DeleteServerTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Constructs a new ClientTlsPolicy. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a ClientTlsPolicy. + * @implements IClientTlsPolicy + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy=} [properties] Properties to set */ - Object.defineProperty(NetworkSecurity.prototype.deleteServerTlsPolicy = function deleteServerTlsPolicy(request, callback) { - return this.rpcCall(deleteServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteServerTlsPolicy" }); + function ClientTlsPolicy(properties) { + this.labels = {}; + this.serverValidationCa = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls DeleteServerTlsPolicy. - * @function deleteServerTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * ClientTlsPolicy name. + * @member {string} name + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance - * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} request DeleteServerTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|listClientTlsPolicies}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef ListClientTlsPoliciesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} [response] ListClientTlsPoliciesResponse */ + ClientTlsPolicy.prototype.name = ""; /** - * Calls ListClientTlsPolicies. - * @function listClientTlsPolicies - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * ClientTlsPolicy description. + * @member {string} description + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} request ListClientTlsPoliciesRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.ListClientTlsPoliciesCallback} callback Node-style callback called with the error, if any, and ListClientTlsPoliciesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(NetworkSecurity.prototype.listClientTlsPolicies = function listClientTlsPolicies(request, callback) { - return this.rpcCall(listClientTlsPolicies, $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest, $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse, request, callback); - }, "name", { value: "ListClientTlsPolicies" }); + ClientTlsPolicy.prototype.description = ""; /** - * Calls ListClientTlsPolicies. - * @function listClientTlsPolicies - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * ClientTlsPolicy createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance - * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} request ListClientTlsPoliciesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|getClientTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef GetClientTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} [response] ClientTlsPolicy */ + ClientTlsPolicy.prototype.createTime = null; /** - * Calls GetClientTlsPolicy. - * @function getClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * ClientTlsPolicy updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance - * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} request GetClientTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.GetClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and ClientTlsPolicy - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(NetworkSecurity.prototype.getClientTlsPolicy = function getClientTlsPolicy(request, callback) { - return this.rpcCall(getClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest, $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy, request, callback); - }, "name", { value: "GetClientTlsPolicy" }); + ClientTlsPolicy.prototype.updateTime = null; /** - * Calls GetClientTlsPolicy. - * @function getClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * ClientTlsPolicy labels. + * @member {Object.} labels + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance - * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} request GetClientTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ClientTlsPolicy.prototype.labels = $util.emptyObject; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|createClientTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef CreateClientTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * ClientTlsPolicy sni. + * @member {string} sni + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @instance */ + ClientTlsPolicy.prototype.sni = ""; /** - * Calls CreateClientTlsPolicy. - * @function createClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * ClientTlsPolicy clientCertificate. + * @member {google.cloud.networksecurity.v1beta1.ICertificateProvider|null|undefined} clientCertificate + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance - * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} request CreateClientTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(NetworkSecurity.prototype.createClientTlsPolicy = function createClientTlsPolicy(request, callback) { - return this.rpcCall(createClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateClientTlsPolicy" }); + ClientTlsPolicy.prototype.clientCertificate = null; /** - * Calls CreateClientTlsPolicy. - * @function createClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * ClientTlsPolicy serverValidationCa. + * @member {Array.} serverValidationCa + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance - * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} request CreateClientTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + ClientTlsPolicy.prototype.serverValidationCa = $util.emptyArray; /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|updateClientTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef UpdateClientTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a new ClientTlsPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy instance */ + ClientTlsPolicy.create = function create(properties) { + return new ClientTlsPolicy(properties); + }; /** - * Calls UpdateClientTlsPolicy. - * @function updateClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} request UpdateClientTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified ClientTlsPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy} message ClientTlsPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(NetworkSecurity.prototype.updateClientTlsPolicy = function updateClientTlsPolicy(request, callback) { - return this.rpcCall(updateClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateClientTlsPolicy" }); - - /** - * Calls UpdateClientTlsPolicy. - * @function updateClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} request UpdateClientTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|deleteClientTlsPolicy}. - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @typedef DeleteClientTlsPolicyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteClientTlsPolicy. - * @function deleteClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} request DeleteClientTlsPolicyRequest message or plain object - * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(NetworkSecurity.prototype.deleteClientTlsPolicy = function deleteClientTlsPolicy(request, callback) { - return this.rpcCall(deleteClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteClientTlsPolicy" }); - - /** - * Calls DeleteClientTlsPolicy. - * @function deleteClientTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity - * @instance - * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} request DeleteClientTlsPolicyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return NetworkSecurity; - })(); - - v1beta1.ServerTlsPolicy = (function() { - - /** - * Properties of a ServerTlsPolicy. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IServerTlsPolicy - * @property {string|null} [name] ServerTlsPolicy name - * @property {string|null} [description] ServerTlsPolicy description - * @property {google.protobuf.ITimestamp|null} [createTime] ServerTlsPolicy createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] ServerTlsPolicy updateTime - * @property {Object.|null} [labels] ServerTlsPolicy labels - * @property {boolean|null} [allowOpen] ServerTlsPolicy allowOpen - * @property {google.cloud.networksecurity.v1beta1.ICertificateProvider|null} [serverCertificate] ServerTlsPolicy serverCertificate - * @property {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy|null} [mtlsPolicy] ServerTlsPolicy mtlsPolicy - */ - - /** - * Constructs a new ServerTlsPolicy. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ServerTlsPolicy. - * @implements IServerTlsPolicy - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy=} [properties] Properties to set - */ - function ServerTlsPolicy(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServerTlsPolicy name. - * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.name = ""; - - /** - * ServerTlsPolicy description. - * @member {string} description - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.description = ""; - - /** - * ServerTlsPolicy createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.createTime = null; - - /** - * ServerTlsPolicy updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.updateTime = null; - - /** - * ServerTlsPolicy labels. - * @member {Object.} labels - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.labels = $util.emptyObject; - - /** - * ServerTlsPolicy allowOpen. - * @member {boolean} allowOpen - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.allowOpen = false; - - /** - * ServerTlsPolicy serverCertificate. - * @member {google.cloud.networksecurity.v1beta1.ICertificateProvider|null|undefined} serverCertificate - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.serverCertificate = null; - - /** - * ServerTlsPolicy mtlsPolicy. - * @member {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy|null|undefined} mtlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @instance - */ - ServerTlsPolicy.prototype.mtlsPolicy = null; - - /** - * Creates a new ServerTlsPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @static - * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy instance - */ - ServerTlsPolicy.create = function create(properties) { - return new ServerTlsPolicy(properties); - }; - - /** - * Encodes the specified ServerTlsPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @static - * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy} message ServerTlsPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServerTlsPolicy.encode = function encode(message, writer) { + ClientTlsPolicy.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -15558,43 +15534,44 @@ if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.allowOpen != null && Object.hasOwnProperty.call(message, "allowOpen")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowOpen); - if (message.serverCertificate != null && Object.hasOwnProperty.call(message, "serverCertificate")) - $root.google.cloud.networksecurity.v1beta1.CertificateProvider.encode(message.serverCertificate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.mtlsPolicy != null && Object.hasOwnProperty.call(message, "mtlsPolicy")) - $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.encode(message.mtlsPolicy, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sni != null && Object.hasOwnProperty.call(message, "sni")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sni); + if (message.clientCertificate != null && Object.hasOwnProperty.call(message, "clientCertificate")) + $root.google.cloud.networksecurity.v1beta1.CertificateProvider.encode(message.clientCertificate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.serverValidationCa != null && message.serverValidationCa.length) + for (var i = 0; i < message.serverValidationCa.length; ++i) + $root.google.cloud.networksecurity.v1beta1.ValidationCA.encode(message.serverValidationCa[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified ServerTlsPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify|verify} messages. + * Encodes the specified ClientTlsPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy} message ServerTlsPolicy message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IClientTlsPolicy} message ClientTlsPolicy message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ServerTlsPolicy.encodeDelimited = function encodeDelimited(message, writer) { + ClientTlsPolicy.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ServerTlsPolicy message from the specified reader or buffer. + * Decodes a ClientTlsPolicy message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy + * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerTlsPolicy.decode = function decode(reader, length, error) { + ClientTlsPolicy.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -15640,15 +15617,17 @@ break; } case 6: { - message.allowOpen = reader.bool(); + message.sni = reader.string(); break; } case 7: { - message.serverCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.decode(reader, reader.uint32()); + message.clientCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.decode(reader, reader.uint32()); break; } case 8: { - message.mtlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.decode(reader, reader.uint32()); + if (!(message.serverValidationCa && message.serverValidationCa.length)) + message.serverValidationCa = []; + message.serverValidationCa.push($root.google.cloud.networksecurity.v1beta1.ValidationCA.decode(reader, reader.uint32())); break; } default: @@ -15660,30 +15639,30 @@ }; /** - * Decodes a ServerTlsPolicy message from the specified reader or buffer, length delimited. + * Decodes a ClientTlsPolicy message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy + * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ServerTlsPolicy.decodeDelimited = function decodeDelimited(reader) { + ClientTlsPolicy.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ServerTlsPolicy message. + * Verifies a ClientTlsPolicy message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ServerTlsPolicy.verify = function verify(message) { + ClientTlsPolicy.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -15710,83 +15689,94 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } - if (message.allowOpen != null && message.hasOwnProperty("allowOpen")) - if (typeof message.allowOpen !== "boolean") - return "allowOpen: boolean expected"; - if (message.serverCertificate != null && message.hasOwnProperty("serverCertificate")) { - var error = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.verify(message.serverCertificate); + if (message.sni != null && message.hasOwnProperty("sni")) + if (!$util.isString(message.sni)) + return "sni: string expected"; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) { + var error = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.verify(message.clientCertificate); if (error) - return "serverCertificate." + error; + return "clientCertificate." + error; } - if (message.mtlsPolicy != null && message.hasOwnProperty("mtlsPolicy")) { - var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.verify(message.mtlsPolicy); - if (error) - return "mtlsPolicy." + error; + if (message.serverValidationCa != null && message.hasOwnProperty("serverValidationCa")) { + if (!Array.isArray(message.serverValidationCa)) + return "serverValidationCa: array expected"; + for (var i = 0; i < message.serverValidationCa.length; ++i) { + var error = $root.google.cloud.networksecurity.v1beta1.ValidationCA.verify(message.serverValidationCa[i]); + if (error) + return "serverValidationCa." + error; + } } return null; }; /** - * Creates a ServerTlsPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a ClientTlsPolicy message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy + * @returns {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} ClientTlsPolicy */ - ServerTlsPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy) + ClientTlsPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy(); + var message = new $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy(); if (object.name != null) message.name = String(object.name); if (object.description != null) message.description = String(object.description); if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.createTime: object expected"); + throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.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.networksecurity.v1beta1.ServerTlsPolicy.updateTime: object expected"); + throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.labels: object expected"); + throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.labels: object expected"); message.labels = {}; for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.allowOpen != null) - message.allowOpen = Boolean(object.allowOpen); - if (object.serverCertificate != null) { - if (typeof object.serverCertificate !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.serverCertificate: object expected"); - message.serverCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.fromObject(object.serverCertificate); + if (object.sni != null) + message.sni = String(object.sni); + if (object.clientCertificate != null) { + if (typeof object.clientCertificate !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.clientCertificate: object expected"); + message.clientCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.fromObject(object.clientCertificate); } - if (object.mtlsPolicy != null) { - if (typeof object.mtlsPolicy !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.mtlsPolicy: object expected"); - message.mtlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.fromObject(object.mtlsPolicy); + if (object.serverValidationCa) { + if (!Array.isArray(object.serverValidationCa)) + throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.serverValidationCa: array expected"); + message.serverValidationCa = []; + for (var i = 0; i < object.serverValidationCa.length; ++i) { + if (typeof object.serverValidationCa[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ClientTlsPolicy.serverValidationCa: object expected"); + message.serverValidationCa[i] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.fromObject(object.serverValidationCa[i]); + } } return message; }; /** - * Creates a plain object from a ServerTlsPolicy message. Also converts values to other types if specified. + * Creates a plain object from a ClientTlsPolicy message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @static - * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} message ServerTlsPolicy + * @param {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} message ClientTlsPolicy * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServerTlsPolicy.toObject = function toObject(message, options) { + ClientTlsPolicy.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.serverValidationCa = []; if (options.objects || options.defaults) object.labels = {}; if (options.defaults) { @@ -15794,9 +15784,8 @@ object.description = ""; object.createTime = null; object.updateTime = null; - object.allowOpen = false; - object.serverCertificate = null; - object.mtlsPolicy = null; + object.sni = ""; + object.clientCertificate = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -15812,342 +15801,119 @@ for (var j = 0; j < keys2.length; ++j) object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.allowOpen != null && message.hasOwnProperty("allowOpen")) - object.allowOpen = message.allowOpen; - if (message.serverCertificate != null && message.hasOwnProperty("serverCertificate")) - object.serverCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.toObject(message.serverCertificate, options); - if (message.mtlsPolicy != null && message.hasOwnProperty("mtlsPolicy")) - object.mtlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.toObject(message.mtlsPolicy, options); + if (message.sni != null && message.hasOwnProperty("sni")) + object.sni = message.sni; + if (message.clientCertificate != null && message.hasOwnProperty("clientCertificate")) + object.clientCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.toObject(message.clientCertificate, options); + if (message.serverValidationCa && message.serverValidationCa.length) { + object.serverValidationCa = []; + for (var j = 0; j < message.serverValidationCa.length; ++j) + object.serverValidationCa[j] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.toObject(message.serverValidationCa[j], options); + } return object; }; /** - * Converts this ServerTlsPolicy to JSON. + * Converts this ClientTlsPolicy to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @instance * @returns {Object.} JSON object */ - ServerTlsPolicy.prototype.toJSON = function toJSON() { + ClientTlsPolicy.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ServerTlsPolicy + * Gets the default type url for ClientTlsPolicy * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ClientTlsPolicy * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ServerTlsPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClientTlsPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ServerTlsPolicy"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ClientTlsPolicy"; }; - ServerTlsPolicy.MTLSPolicy = (function() { - - /** - * Properties of a MTLSPolicy. - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @interface IMTLSPolicy - * @property {Array.|null} [clientValidationCa] MTLSPolicy clientValidationCa - */ + return ClientTlsPolicy; + })(); - /** - * Constructs a new MTLSPolicy. - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy - * @classdesc Represents a MTLSPolicy. - * @implements IMTLSPolicy - * @constructor - * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy=} [properties] Properties to set - */ - function MTLSPolicy(properties) { - this.clientValidationCa = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1beta1.ListClientTlsPoliciesRequest = (function() { - /** - * MTLSPolicy clientValidationCa. - * @member {Array.} clientValidationCa - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @instance - */ - MTLSPolicy.prototype.clientValidationCa = $util.emptyArray; + /** + * Properties of a ListClientTlsPoliciesRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IListClientTlsPoliciesRequest + * @property {string|null} [parent] ListClientTlsPoliciesRequest parent + * @property {number|null} [pageSize] ListClientTlsPoliciesRequest pageSize + * @property {string|null} [pageToken] ListClientTlsPoliciesRequest pageToken + */ - /** - * Creates a new MTLSPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy instance - */ - MTLSPolicy.create = function create(properties) { - return new MTLSPolicy(properties); - }; + /** + * Constructs a new ListClientTlsPoliciesRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a ListClientTlsPoliciesRequest. + * @implements IListClientTlsPoliciesRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest=} [properties] Properties to set + */ + function ListClientTlsPoliciesRequest(properties) { + if (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 MTLSPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy} message MTLSPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MTLSPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientValidationCa != null && message.clientValidationCa.length) - for (var i = 0; i < message.clientValidationCa.length; ++i) - $root.google.cloud.networksecurity.v1beta1.ValidationCA.encode(message.clientValidationCa[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; + /** + * ListClientTlsPoliciesRequest parent. + * @member {string} parent + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @instance + */ + ListClientTlsPoliciesRequest.prototype.parent = ""; - /** - * Encodes the specified MTLSPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy} message MTLSPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MTLSPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * ListClientTlsPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @instance + */ + ListClientTlsPoliciesRequest.prototype.pageSize = 0; - /** - * Decodes a MTLSPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MTLSPolicy.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.clientValidationCa && message.clientValidationCa.length)) - message.clientValidationCa = []; - message.clientValidationCa.push($root.google.cloud.networksecurity.v1beta1.ValidationCA.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * ListClientTlsPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @instance + */ + ListClientTlsPoliciesRequest.prototype.pageToken = ""; - /** - * Decodes a MTLSPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MTLSPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MTLSPolicy message. - * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MTLSPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientValidationCa != null && message.hasOwnProperty("clientValidationCa")) { - if (!Array.isArray(message.clientValidationCa)) - return "clientValidationCa: array expected"; - for (var i = 0; i < message.clientValidationCa.length; ++i) { - var error = $root.google.cloud.networksecurity.v1beta1.ValidationCA.verify(message.clientValidationCa[i]); - if (error) - return "clientValidationCa." + error; - } - } - return null; - }; - - /** - * Creates a MTLSPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy - */ - MTLSPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy) - return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy(); - if (object.clientValidationCa) { - if (!Array.isArray(object.clientValidationCa)) - throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.clientValidationCa: array expected"); - message.clientValidationCa = []; - for (var i = 0; i < object.clientValidationCa.length; ++i) { - if (typeof object.clientValidationCa[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.clientValidationCa: object expected"); - message.clientValidationCa[i] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.fromObject(object.clientValidationCa[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MTLSPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} message MTLSPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MTLSPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.clientValidationCa = []; - if (message.clientValidationCa && message.clientValidationCa.length) { - object.clientValidationCa = []; - for (var j = 0; j < message.clientValidationCa.length; ++j) - object.clientValidationCa[j] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.toObject(message.clientValidationCa[j], options); - } - return object; - }; - - /** - * Converts this MTLSPolicy to JSON. - * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @instance - * @returns {Object.} JSON object - */ - MTLSPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MTLSPolicy - * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MTLSPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy"; - }; - - return MTLSPolicy; - })(); - - return ServerTlsPolicy; - })(); - - v1beta1.ListServerTlsPoliciesRequest = (function() { - - /** - * Properties of a ListServerTlsPoliciesRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @interface IListServerTlsPoliciesRequest - * @property {string|null} [parent] ListServerTlsPoliciesRequest parent - * @property {number|null} [pageSize] ListServerTlsPoliciesRequest pageSize - * @property {string|null} [pageToken] ListServerTlsPoliciesRequest pageToken - */ - - /** - * Constructs a new ListServerTlsPoliciesRequest. - * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ListServerTlsPoliciesRequest. - * @implements IListServerTlsPoliciesRequest - * @constructor - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest=} [properties] Properties to set - */ - function ListServerTlsPoliciesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListServerTlsPoliciesRequest parent. - * @member {string} parent - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest - * @instance - */ - ListServerTlsPoliciesRequest.prototype.parent = ""; - - /** - * ListServerTlsPoliciesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest - * @instance - */ - ListServerTlsPoliciesRequest.prototype.pageSize = 0; - - /** - * ListServerTlsPoliciesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest - * @instance - */ - ListServerTlsPoliciesRequest.prototype.pageToken = ""; - - /** - * Creates a new ListServerTlsPoliciesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest - * @static - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest instance - */ - ListServerTlsPoliciesRequest.create = function create(properties) { - return new ListServerTlsPoliciesRequest(properties); - }; + /** + * Creates a new ListClientTlsPoliciesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest instance + */ + ListClientTlsPoliciesRequest.create = function create(properties) { + return new ListClientTlsPoliciesRequest(properties); + }; /** - * Encodes the specified ListServerTlsPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest.verify|verify} messages. + * Encodes the specified ListClientTlsPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} message ListServerTlsPoliciesRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServerTlsPoliciesRequest.encode = function encode(message, writer) { + ListClientTlsPoliciesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) @@ -16160,33 +15926,33 @@ }; /** - * Encodes the specified ListServerTlsPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest.verify|verify} messages. + * Encodes the specified ListClientTlsPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} message ListServerTlsPoliciesRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServerTlsPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListClientTlsPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServerTlsPoliciesRequest message from the specified reader or buffer. + * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServerTlsPoliciesRequest.decode = function decode(reader, length, error) { + ListClientTlsPoliciesRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -16213,30 +15979,30 @@ }; /** - * Decodes a ListServerTlsPoliciesRequest message from the specified reader or buffer, length delimited. + * Decodes a ListClientTlsPoliciesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServerTlsPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + ListClientTlsPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServerTlsPoliciesRequest message. + * Verifies a ListClientTlsPoliciesRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServerTlsPoliciesRequest.verify = function verify(message) { + ListClientTlsPoliciesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.parent != null && message.hasOwnProperty("parent")) @@ -16252,17 +16018,17 @@ }; /** - * Creates a ListServerTlsPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListClientTlsPoliciesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} ListClientTlsPoliciesRequest */ - ListServerTlsPoliciesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest) + ListClientTlsPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest(); + var message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -16273,15 +16039,15 @@ }; /** - * Creates a plain object from a ListServerTlsPoliciesRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListClientTlsPoliciesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} message ListServerTlsPoliciesRequest + * @param {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest} message ListClientTlsPoliciesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServerTlsPoliciesRequest.toObject = function toObject(message, options) { + ListClientTlsPoliciesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -16300,54 +16066,54 @@ }; /** - * Converts this ListServerTlsPoliciesRequest to JSON. + * Converts this ListClientTlsPoliciesRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @instance * @returns {Object.} JSON object */ - ListServerTlsPoliciesRequest.prototype.toJSON = function toJSON() { + ListClientTlsPoliciesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServerTlsPoliciesRequest + * Gets the default type url for ListClientTlsPoliciesRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServerTlsPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListClientTlsPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest"; }; - return ListServerTlsPoliciesRequest; + return ListClientTlsPoliciesRequest; })(); - v1beta1.ListServerTlsPoliciesResponse = (function() { + v1beta1.ListClientTlsPoliciesResponse = (function() { /** - * Properties of a ListServerTlsPoliciesResponse. + * Properties of a ListClientTlsPoliciesResponse. * @memberof google.cloud.networksecurity.v1beta1 - * @interface IListServerTlsPoliciesResponse - * @property {Array.|null} [serverTlsPolicies] ListServerTlsPoliciesResponse serverTlsPolicies - * @property {string|null} [nextPageToken] ListServerTlsPoliciesResponse nextPageToken + * @interface IListClientTlsPoliciesResponse + * @property {Array.|null} [clientTlsPolicies] ListClientTlsPoliciesResponse clientTlsPolicies + * @property {string|null} [nextPageToken] ListClientTlsPoliciesResponse nextPageToken */ /** - * Constructs a new ListServerTlsPoliciesResponse. + * Constructs a new ListClientTlsPoliciesResponse. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a ListServerTlsPoliciesResponse. - * @implements IListServerTlsPoliciesResponse + * @classdesc Represents a ListClientTlsPoliciesResponse. + * @implements IListClientTlsPoliciesResponse * @constructor - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse=} [properties] Properties to set */ - function ListServerTlsPoliciesResponse(properties) { - this.serverTlsPolicies = []; + function ListClientTlsPoliciesResponse(properties) { + this.clientTlsPolicies = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16355,90 +16121,90 @@ } /** - * ListServerTlsPoliciesResponse serverTlsPolicies. - * @member {Array.} serverTlsPolicies - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * ListClientTlsPoliciesResponse clientTlsPolicies. + * @member {Array.} clientTlsPolicies + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @instance */ - ListServerTlsPoliciesResponse.prototype.serverTlsPolicies = $util.emptyArray; + ListClientTlsPoliciesResponse.prototype.clientTlsPolicies = $util.emptyArray; /** - * ListServerTlsPoliciesResponse nextPageToken. + * ListClientTlsPoliciesResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @instance */ - ListServerTlsPoliciesResponse.prototype.nextPageToken = ""; + ListClientTlsPoliciesResponse.prototype.nextPageToken = ""; /** - * Creates a new ListServerTlsPoliciesResponse instance using the specified properties. + * Creates a new ListClientTlsPoliciesResponse instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse instance + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse instance */ - ListServerTlsPoliciesResponse.create = function create(properties) { - return new ListServerTlsPoliciesResponse(properties); + ListClientTlsPoliciesResponse.create = function create(properties) { + return new ListClientTlsPoliciesResponse(properties); }; /** - * Encodes the specified ListServerTlsPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.verify|verify} messages. + * Encodes the specified ListClientTlsPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse} message ListServerTlsPoliciesResponse message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServerTlsPoliciesResponse.encode = function encode(message, writer) { + ListClientTlsPoliciesResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.serverTlsPolicies != null && message.serverTlsPolicies.length) - for (var i = 0; i < message.serverTlsPolicies.length; ++i) - $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.encode(message.serverTlsPolicies[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.clientTlsPolicies != null && message.clientTlsPolicies.length) + for (var i = 0; i < message.clientTlsPolicies.length; ++i) + $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.encode(message.clientTlsPolicies[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 ListServerTlsPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.verify|verify} messages. + * Encodes the specified ListClientTlsPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse} message ListServerTlsPoliciesResponse message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListServerTlsPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ListClientTlsPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListServerTlsPoliciesResponse message from the specified reader or buffer. + * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServerTlsPoliciesResponse.decode = function decode(reader, length, error) { + ListClientTlsPoliciesResponse.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.serverTlsPolicies && message.serverTlsPolicies.length)) - message.serverTlsPolicies = []; - message.serverTlsPolicies.push($root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.decode(reader, reader.uint32())); + if (!(message.clientTlsPolicies && message.clientTlsPolicies.length)) + message.clientTlsPolicies = []; + message.clientTlsPolicies.push($root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.decode(reader, reader.uint32())); break; } case 2: { @@ -16454,39 +16220,39 @@ }; /** - * Decodes a ListServerTlsPoliciesResponse message from the specified reader or buffer, length delimited. + * Decodes a ListClientTlsPoliciesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListServerTlsPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + ListClientTlsPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListServerTlsPoliciesResponse message. + * Verifies a ListClientTlsPoliciesResponse message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListServerTlsPoliciesResponse.verify = function verify(message) { + ListClientTlsPoliciesResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.serverTlsPolicies != null && message.hasOwnProperty("serverTlsPolicies")) { - if (!Array.isArray(message.serverTlsPolicies)) - return "serverTlsPolicies: array expected"; - for (var i = 0; i < message.serverTlsPolicies.length; ++i) { - var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify(message.serverTlsPolicies[i]); + if (message.clientTlsPolicies != null && message.hasOwnProperty("clientTlsPolicies")) { + if (!Array.isArray(message.clientTlsPolicies)) + return "clientTlsPolicies: array expected"; + for (var i = 0; i < message.clientTlsPolicies.length; ++i) { + var error = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify(message.clientTlsPolicies[i]); if (error) - return "serverTlsPolicies." + error; + return "clientTlsPolicies." + error; } } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) @@ -16496,25 +16262,25 @@ }; /** - * Creates a ListServerTlsPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a ListClientTlsPoliciesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse + * @returns {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} ListClientTlsPoliciesResponse */ - ListServerTlsPoliciesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse) + ListClientTlsPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse(); - if (object.serverTlsPolicies) { - if (!Array.isArray(object.serverTlsPolicies)) - throw TypeError(".google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.serverTlsPolicies: array expected"); - message.serverTlsPolicies = []; - for (var i = 0; i < object.serverTlsPolicies.length; ++i) { - if (typeof object.serverTlsPolicies[i] !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.serverTlsPolicies: object expected"); - message.serverTlsPolicies[i] = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.fromObject(object.serverTlsPolicies[i]); + var message = new $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse(); + if (object.clientTlsPolicies) { + if (!Array.isArray(object.clientTlsPolicies)) + throw TypeError(".google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.clientTlsPolicies: array expected"); + message.clientTlsPolicies = []; + for (var i = 0; i < object.clientTlsPolicies.length; ++i) { + if (typeof object.clientTlsPolicies[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse.clientTlsPolicies: object expected"); + message.clientTlsPolicies[i] = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.fromObject(object.clientTlsPolicies[i]); } } if (object.nextPageToken != null) @@ -16523,26 +16289,26 @@ }; /** - * Creates a plain object from a ListServerTlsPoliciesResponse message. Also converts values to other types if specified. + * Creates a plain object from a ListClientTlsPoliciesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static - * @param {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} message ListServerTlsPoliciesResponse + * @param {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} message ListClientTlsPoliciesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListServerTlsPoliciesResponse.toObject = function toObject(message, options) { + ListClientTlsPoliciesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.serverTlsPolicies = []; + object.clientTlsPolicies = []; if (options.defaults) object.nextPageToken = ""; - if (message.serverTlsPolicies && message.serverTlsPolicies.length) { - object.serverTlsPolicies = []; - for (var j = 0; j < message.serverTlsPolicies.length; ++j) - object.serverTlsPolicies[j] = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.toObject(message.serverTlsPolicies[j], options); + if (message.clientTlsPolicies && message.clientTlsPolicies.length) { + object.clientTlsPolicies = []; + for (var j = 0; j < message.clientTlsPolicies.length; ++j) + object.clientTlsPolicies[j] = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.toObject(message.clientTlsPolicies[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -16550,52 +16316,52 @@ }; /** - * Converts this ListServerTlsPoliciesResponse to JSON. + * Converts this ListClientTlsPoliciesResponse to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @instance * @returns {Object.} JSON object */ - ListServerTlsPoliciesResponse.prototype.toJSON = function toJSON() { + ListClientTlsPoliciesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListServerTlsPoliciesResponse + * Gets the default type url for ListClientTlsPoliciesResponse * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @memberof google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListServerTlsPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListClientTlsPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse"; }; - return ListServerTlsPoliciesResponse; + return ListClientTlsPoliciesResponse; })(); - v1beta1.GetServerTlsPolicyRequest = (function() { + v1beta1.GetClientTlsPolicyRequest = (function() { /** - * Properties of a GetServerTlsPolicyRequest. + * Properties of a GetClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @interface IGetServerTlsPolicyRequest - * @property {string|null} [name] GetServerTlsPolicyRequest name + * @interface IGetClientTlsPolicyRequest + * @property {string|null} [name] GetClientTlsPolicyRequest name */ /** - * Constructs a new GetServerTlsPolicyRequest. + * Constructs a new GetClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a GetServerTlsPolicyRequest. - * @implements IGetServerTlsPolicyRequest + * @classdesc Represents a GetClientTlsPolicyRequest. + * @implements IGetClientTlsPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest=} [properties] Properties to set */ - function GetServerTlsPolicyRequest(properties) { + function GetClientTlsPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16603,35 +16369,35 @@ } /** - * GetServerTlsPolicyRequest name. + * GetClientTlsPolicyRequest name. * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @instance */ - GetServerTlsPolicyRequest.prototype.name = ""; + GetClientTlsPolicyRequest.prototype.name = ""; /** - * Creates a new GetServerTlsPolicyRequest instance using the specified properties. + * Creates a new GetClientTlsPolicyRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest instance + * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest instance */ - GetServerTlsPolicyRequest.create = function create(properties) { - return new GetServerTlsPolicyRequest(properties); + GetClientTlsPolicyRequest.create = function create(properties) { + return new GetClientTlsPolicyRequest(properties); }; /** - * Encodes the specified GetServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified GetClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} message GetServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} message GetClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServerTlsPolicyRequest.encode = function encode(message, writer) { + GetClientTlsPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -16640,33 +16406,33 @@ }; /** - * Encodes the specified GetServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified GetClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} message GetServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} message GetClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetServerTlsPolicyRequest message from the specified reader or buffer. + * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServerTlsPolicyRequest.decode = function decode(reader, length, error) { + GetClientTlsPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -16685,30 +16451,30 @@ }; /** - * Decodes a GetServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a GetClientTlsPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + GetClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetServerTlsPolicyRequest message. + * Verifies a GetClientTlsPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetServerTlsPolicyRequest.verify = function verify(message) { + GetClientTlsPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -16718,32 +16484,32 @@ }; /** - * Creates a GetServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} GetClientTlsPolicyRequest */ - GetServerTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest) + GetClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest(); + var message = new $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetServerTlsPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetClientTlsPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} message GetServerTlsPolicyRequest + * @param {google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest} message GetClientTlsPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetServerTlsPolicyRequest.toObject = function toObject(message, options) { + GetClientTlsPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -16755,54 +16521,54 @@ }; /** - * Converts this GetServerTlsPolicyRequest to JSON. + * Converts this GetClientTlsPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @instance * @returns {Object.} JSON object */ - GetServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + GetClientTlsPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetServerTlsPolicyRequest + * Gets the default type url for GetClientTlsPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest"; }; - return GetServerTlsPolicyRequest; + return GetClientTlsPolicyRequest; })(); - v1beta1.CreateServerTlsPolicyRequest = (function() { + v1beta1.CreateClientTlsPolicyRequest = (function() { /** - * Properties of a CreateServerTlsPolicyRequest. + * Properties of a CreateClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @interface ICreateServerTlsPolicyRequest - * @property {string|null} [parent] CreateServerTlsPolicyRequest parent - * @property {string|null} [serverTlsPolicyId] CreateServerTlsPolicyRequest serverTlsPolicyId - * @property {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null} [serverTlsPolicy] CreateServerTlsPolicyRequest serverTlsPolicy + * @interface ICreateClientTlsPolicyRequest + * @property {string|null} [parent] CreateClientTlsPolicyRequest parent + * @property {string|null} [clientTlsPolicyId] CreateClientTlsPolicyRequest clientTlsPolicyId + * @property {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null} [clientTlsPolicy] CreateClientTlsPolicyRequest clientTlsPolicy */ /** - * Constructs a new CreateServerTlsPolicyRequest. + * Constructs a new CreateClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a CreateServerTlsPolicyRequest. - * @implements ICreateServerTlsPolicyRequest + * @classdesc Represents a CreateClientTlsPolicyRequest. + * @implements ICreateClientTlsPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest=} [properties] Properties to set */ - function CreateServerTlsPolicyRequest(properties) { + function CreateClientTlsPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16810,90 +16576,90 @@ } /** - * CreateServerTlsPolicyRequest parent. + * CreateClientTlsPolicyRequest parent. * @member {string} parent - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @instance */ - CreateServerTlsPolicyRequest.prototype.parent = ""; + CreateClientTlsPolicyRequest.prototype.parent = ""; /** - * CreateServerTlsPolicyRequest serverTlsPolicyId. - * @member {string} serverTlsPolicyId - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * CreateClientTlsPolicyRequest clientTlsPolicyId. + * @member {string} clientTlsPolicyId + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @instance */ - CreateServerTlsPolicyRequest.prototype.serverTlsPolicyId = ""; + CreateClientTlsPolicyRequest.prototype.clientTlsPolicyId = ""; /** - * CreateServerTlsPolicyRequest serverTlsPolicy. - * @member {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null|undefined} serverTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * CreateClientTlsPolicyRequest clientTlsPolicy. + * @member {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null|undefined} clientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @instance */ - CreateServerTlsPolicyRequest.prototype.serverTlsPolicy = null; + CreateClientTlsPolicyRequest.prototype.clientTlsPolicy = null; /** - * Creates a new CreateServerTlsPolicyRequest instance using the specified properties. + * Creates a new CreateClientTlsPolicyRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest instance + * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest instance */ - CreateServerTlsPolicyRequest.create = function create(properties) { - return new CreateServerTlsPolicyRequest(properties); + CreateClientTlsPolicyRequest.create = function create(properties) { + return new CreateClientTlsPolicyRequest(properties); }; /** - * Encodes the specified CreateServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified CreateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} message CreateServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServerTlsPolicyRequest.encode = function encode(message, writer) { + CreateClientTlsPolicyRequest.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.serverTlsPolicyId != null && Object.hasOwnProperty.call(message, "serverTlsPolicyId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.serverTlsPolicyId); - if (message.serverTlsPolicy != null && Object.hasOwnProperty.call(message, "serverTlsPolicy")) - $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.encode(message.serverTlsPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.clientTlsPolicyId != null && Object.hasOwnProperty.call(message, "clientTlsPolicyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientTlsPolicyId); + if (message.clientTlsPolicy != null && Object.hasOwnProperty.call(message, "clientTlsPolicy")) + $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.encode(message.clientTlsPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified CreateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} message CreateServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateServerTlsPolicyRequest message from the specified reader or buffer. + * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServerTlsPolicyRequest.decode = function decode(reader, length, error) { + CreateClientTlsPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -16904,11 +16670,11 @@ break; } case 2: { - message.serverTlsPolicyId = reader.string(); + message.clientTlsPolicyId = reader.string(); break; } case 3: { - message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.decode(reader, reader.uint32()); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.decode(reader, reader.uint32()); break; } default: @@ -16920,145 +16686,145 @@ }; /** - * Decodes a CreateServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + CreateClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateServerTlsPolicyRequest message. + * Verifies a CreateClientTlsPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateServerTlsPolicyRequest.verify = function verify(message) { + CreateClientTlsPolicyRequest.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.serverTlsPolicyId != null && message.hasOwnProperty("serverTlsPolicyId")) - if (!$util.isString(message.serverTlsPolicyId)) - return "serverTlsPolicyId: string expected"; - if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) { - var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify(message.serverTlsPolicy); + if (message.clientTlsPolicyId != null && message.hasOwnProperty("clientTlsPolicyId")) + if (!$util.isString(message.clientTlsPolicyId)) + return "clientTlsPolicyId: string expected"; + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) { + var error = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify(message.clientTlsPolicy); if (error) - return "serverTlsPolicy." + error; + return "clientTlsPolicy." + error; } return null; }; /** - * Creates a CreateServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} CreateClientTlsPolicyRequest */ - CreateServerTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest) + CreateClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest(); + var message = new $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.serverTlsPolicyId != null) - message.serverTlsPolicyId = String(object.serverTlsPolicyId); - if (object.serverTlsPolicy != null) { - if (typeof object.serverTlsPolicy !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest.serverTlsPolicy: object expected"); - message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.fromObject(object.serverTlsPolicy); + if (object.clientTlsPolicyId != null) + message.clientTlsPolicyId = String(object.clientTlsPolicyId); + if (object.clientTlsPolicy != null) { + if (typeof object.clientTlsPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest.clientTlsPolicy: object expected"); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.fromObject(object.clientTlsPolicy); } return message; }; /** - * Creates a plain object from a CreateServerTlsPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateClientTlsPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} message CreateServerTlsPolicyRequest + * @param {google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest} message CreateClientTlsPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateServerTlsPolicyRequest.toObject = function toObject(message, options) { + CreateClientTlsPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.serverTlsPolicyId = ""; - object.serverTlsPolicy = null; + object.clientTlsPolicyId = ""; + object.clientTlsPolicy = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.serverTlsPolicyId != null && message.hasOwnProperty("serverTlsPolicyId")) - object.serverTlsPolicyId = message.serverTlsPolicyId; - if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) - object.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.toObject(message.serverTlsPolicy, options); + if (message.clientTlsPolicyId != null && message.hasOwnProperty("clientTlsPolicyId")) + object.clientTlsPolicyId = message.clientTlsPolicyId; + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) + object.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.toObject(message.clientTlsPolicy, options); return object; }; /** - * Converts this CreateServerTlsPolicyRequest to JSON. + * Converts this CreateClientTlsPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @instance * @returns {Object.} JSON object */ - CreateServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + CreateClientTlsPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateServerTlsPolicyRequest + * Gets the default type url for CreateClientTlsPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CreateClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest"; }; - return CreateServerTlsPolicyRequest; + return CreateClientTlsPolicyRequest; })(); - v1beta1.UpdateServerTlsPolicyRequest = (function() { + v1beta1.UpdateClientTlsPolicyRequest = (function() { /** - * Properties of an UpdateServerTlsPolicyRequest. + * Properties of an UpdateClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @interface IUpdateServerTlsPolicyRequest - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServerTlsPolicyRequest updateMask - * @property {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null} [serverTlsPolicy] UpdateServerTlsPolicyRequest serverTlsPolicy + * @interface IUpdateClientTlsPolicyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateClientTlsPolicyRequest updateMask + * @property {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null} [clientTlsPolicy] UpdateClientTlsPolicyRequest clientTlsPolicy */ /** - * Constructs a new UpdateServerTlsPolicyRequest. + * Constructs a new UpdateClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents an UpdateServerTlsPolicyRequest. - * @implements IUpdateServerTlsPolicyRequest + * @classdesc Represents an UpdateClientTlsPolicyRequest. + * @implements IUpdateClientTlsPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest=} [properties] Properties to set */ - function UpdateServerTlsPolicyRequest(properties) { + function UpdateClientTlsPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17066,80 +16832,80 @@ } /** - * UpdateServerTlsPolicyRequest updateMask. + * UpdateClientTlsPolicyRequest updateMask. * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @instance */ - UpdateServerTlsPolicyRequest.prototype.updateMask = null; + UpdateClientTlsPolicyRequest.prototype.updateMask = null; /** - * UpdateServerTlsPolicyRequest serverTlsPolicy. - * @member {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null|undefined} serverTlsPolicy - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * UpdateClientTlsPolicyRequest clientTlsPolicy. + * @member {google.cloud.networksecurity.v1beta1.IClientTlsPolicy|null|undefined} clientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @instance */ - UpdateServerTlsPolicyRequest.prototype.serverTlsPolicy = null; + UpdateClientTlsPolicyRequest.prototype.clientTlsPolicy = null; /** - * Creates a new UpdateServerTlsPolicyRequest instance using the specified properties. + * Creates a new UpdateClientTlsPolicyRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest instance + * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest instance */ - UpdateServerTlsPolicyRequest.create = function create(properties) { - return new UpdateServerTlsPolicyRequest(properties); + UpdateClientTlsPolicyRequest.create = function create(properties) { + return new UpdateClientTlsPolicyRequest(properties); }; /** - * Encodes the specified UpdateServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified UpdateClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} message UpdateServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServerTlsPolicyRequest.encode = function encode(message, writer) { + UpdateClientTlsPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.serverTlsPolicy != null && Object.hasOwnProperty.call(message, "serverTlsPolicy")) - $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.encode(message.serverTlsPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.clientTlsPolicy != null && Object.hasOwnProperty.call(message, "clientTlsPolicy")) + $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.encode(message.clientTlsPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified UpdateClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} message UpdateServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateServerTlsPolicyRequest message from the specified reader or buffer. + * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServerTlsPolicyRequest.decode = function decode(reader, length, error) { + UpdateClientTlsPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -17150,7 +16916,7 @@ break; } case 2: { - message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.decode(reader, reader.uint32()); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.decode(reader, reader.uint32()); break; } default: @@ -17162,30 +16928,30 @@ }; /** - * Decodes an UpdateServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateClientTlsPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateServerTlsPolicyRequest message. + * Verifies an UpdateClientTlsPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateServerTlsPolicyRequest.verify = function verify(message) { + UpdateClientTlsPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.updateMask != null && message.hasOwnProperty("updateMask")) { @@ -17193,110 +16959,110 @@ if (error) return "updateMask." + error; } - if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) { - var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify(message.serverTlsPolicy); + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) { + var error = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.verify(message.clientTlsPolicy); if (error) - return "serverTlsPolicy." + error; + return "clientTlsPolicy." + error; } return null; }; /** - * Creates an UpdateServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} UpdateClientTlsPolicyRequest */ - UpdateServerTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest) + UpdateClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest(); + var message = new $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest(); if (object.updateMask != null) { if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.updateMask: object expected"); + throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.updateMask: object expected"); message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } - if (object.serverTlsPolicy != null) { - if (typeof object.serverTlsPolicy !== "object") - throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.serverTlsPolicy: object expected"); - message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.fromObject(object.serverTlsPolicy); + if (object.clientTlsPolicy != null) { + if (typeof object.clientTlsPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest.clientTlsPolicy: object expected"); + message.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.fromObject(object.clientTlsPolicy); } return message; }; /** - * Creates a plain object from an UpdateServerTlsPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateClientTlsPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} message UpdateServerTlsPolicyRequest + * @param {google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest} message UpdateClientTlsPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateServerTlsPolicyRequest.toObject = function toObject(message, options) { + UpdateClientTlsPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.updateMask = null; - object.serverTlsPolicy = null; + object.clientTlsPolicy = null; } if (message.updateMask != null && message.hasOwnProperty("updateMask")) object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) - object.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.toObject(message.serverTlsPolicy, options); + if (message.clientTlsPolicy != null && message.hasOwnProperty("clientTlsPolicy")) + object.clientTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy.toObject(message.clientTlsPolicy, options); return object; }; /** - * Converts this UpdateServerTlsPolicyRequest to JSON. + * Converts this UpdateClientTlsPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @instance * @returns {Object.} JSON object */ - UpdateServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + UpdateClientTlsPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateServerTlsPolicyRequest + * Gets the default type url for UpdateClientTlsPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest"; }; - return UpdateServerTlsPolicyRequest; + return UpdateClientTlsPolicyRequest; })(); - v1beta1.DeleteServerTlsPolicyRequest = (function() { + v1beta1.DeleteClientTlsPolicyRequest = (function() { /** - * Properties of a DeleteServerTlsPolicyRequest. + * Properties of a DeleteClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @interface IDeleteServerTlsPolicyRequest - * @property {string|null} [name] DeleteServerTlsPolicyRequest name + * @interface IDeleteClientTlsPolicyRequest + * @property {string|null} [name] DeleteClientTlsPolicyRequest name */ /** - * Constructs a new DeleteServerTlsPolicyRequest. + * Constructs a new DeleteClientTlsPolicyRequest. * @memberof google.cloud.networksecurity.v1beta1 - * @classdesc Represents a DeleteServerTlsPolicyRequest. - * @implements IDeleteServerTlsPolicyRequest + * @classdesc Represents a DeleteClientTlsPolicyRequest. + * @implements IDeleteClientTlsPolicyRequest * @constructor - * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest=} [properties] Properties to set + * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest=} [properties] Properties to set */ - function DeleteServerTlsPolicyRequest(properties) { + function DeleteClientTlsPolicyRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17304,35 +17070,35 @@ } /** - * DeleteServerTlsPolicyRequest name. + * DeleteClientTlsPolicyRequest name. * @member {string} name - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @instance */ - DeleteServerTlsPolicyRequest.prototype.name = ""; + DeleteClientTlsPolicyRequest.prototype.name = ""; /** - * Creates a new DeleteServerTlsPolicyRequest instance using the specified properties. + * Creates a new DeleteClientTlsPolicyRequest instance using the specified properties. * @function create - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest=} [properties] Properties to set - * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest instance + * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest instance */ - DeleteServerTlsPolicyRequest.create = function create(properties) { - return new DeleteServerTlsPolicyRequest(properties); + DeleteClientTlsPolicyRequest.create = function create(properties) { + return new DeleteClientTlsPolicyRequest(properties); }; /** - * Encodes the specified DeleteServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified DeleteClientTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} message DeleteServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServerTlsPolicyRequest.encode = function encode(message, writer) { + DeleteClientTlsPolicyRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -17341,33 +17107,33 @@ }; /** - * Encodes the specified DeleteServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest.verify|verify} messages. + * Encodes the specified DeleteClientTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} message DeleteServerTlsPolicyRequest message or plain object to encode + * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteClientTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteServerTlsPolicyRequest message from the specified reader or buffer. + * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServerTlsPolicyRequest.decode = function decode(reader, length, error) { + DeleteClientTlsPolicyRequest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -17386,30 +17152,30 @@ }; /** - * Decodes a DeleteServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteClientTlsPolicyRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteClientTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteServerTlsPolicyRequest message. + * Verifies a DeleteClientTlsPolicyRequest message. * @function verify - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteServerTlsPolicyRequest.verify = function verify(message) { + DeleteClientTlsPolicyRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -17419,32 +17185,32 @@ }; /** - * Creates a DeleteServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteClientTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest + * @returns {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} DeleteClientTlsPolicyRequest */ - DeleteServerTlsPolicyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest) + DeleteClientTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest) return object; - var message = new $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest(); + var message = new $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeleteServerTlsPolicyRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteClientTlsPolicyRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static - * @param {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} message DeleteServerTlsPolicyRequest + * @param {google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest} message DeleteClientTlsPolicyRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteServerTlsPolicyRequest.toObject = function toObject(message, options) { + DeleteClientTlsPolicyRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -17456,179 +17222,4058 @@ }; /** - * Converts this DeleteServerTlsPolicyRequest to JSON. + * Converts this DeleteClientTlsPolicyRequest to JSON. * @function toJSON - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @instance * @returns {Object.} JSON object */ - DeleteServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + DeleteClientTlsPolicyRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteServerTlsPolicyRequest + * Gets the default type url for DeleteClientTlsPolicyRequest * @function getTypeUrl - * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @memberof google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteClientTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest"; + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest"; }; - return DeleteServerTlsPolicyRequest; + return DeleteClientTlsPolicyRequest; })(); - return v1beta1; - })(); + v1beta1.GrpcEndpoint = (function() { - return networksecurity; - })(); + /** + * Properties of a GrpcEndpoint. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IGrpcEndpoint + * @property {string|null} [targetUri] GrpcEndpoint targetUri + */ - return cloud; - })(); + /** + * Constructs a new GrpcEndpoint. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a GrpcEndpoint. + * @implements IGrpcEndpoint + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint=} [properties] Properties to set + */ + function GrpcEndpoint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - google.api = (function() { + /** + * GrpcEndpoint targetUri. + * @member {string} targetUri + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @instance + */ + GrpcEndpoint.prototype.targetUri = ""; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * Creates a new GrpcEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint instance + */ + GrpcEndpoint.create = function create(properties) { + return new GrpcEndpoint(properties); + }; - /** - * 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() { + /** + * Encodes the specified GrpcEndpoint message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint} message GrpcEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrpcEndpoint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.targetUri != null && Object.hasOwnProperty.call(message, "targetUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.targetUri); + return writer; + }; - /** - * 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 GrpcEndpoint message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {google.cloud.networksecurity.v1beta1.IGrpcEndpoint} message GrpcEndpoint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GrpcEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * 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]]; - } + /** + * Decodes a GrpcEndpoint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrpcEndpoint.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.targetUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; + /** + * Decodes a GrpcEndpoint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GrpcEndpoint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + /** + * Verifies a GrpcEndpoint message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GrpcEndpoint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.targetUri != null && message.hasOwnProperty("targetUri")) + if (!$util.isString(message.targetUri)) + return "targetUri: string expected"; + return null; + }; - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; + /** + * Creates a GrpcEndpoint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.GrpcEndpoint} GrpcEndpoint + */ + GrpcEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint(); + if (object.targetUri != null) + message.targetUri = String(object.targetUri); + return message; + }; - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; + /** + * Creates a plain object from a GrpcEndpoint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {google.cloud.networksecurity.v1beta1.GrpcEndpoint} message GrpcEndpoint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GrpcEndpoint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.targetUri = ""; + if (message.targetUri != null && message.hasOwnProperty("targetUri")) + object.targetUri = message.targetUri; + return object; + }; - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; + /** + * Converts this GrpcEndpoint to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @instance + * @returns {Object.} JSON object + */ + GrpcEndpoint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; + /** + * Gets the default type url for GrpcEndpoint + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.GrpcEndpoint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GrpcEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GrpcEndpoint"; + }; - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; + return GrpcEndpoint; + })(); - /** - * 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); - }; + v1beta1.ValidationCA = (function() { + + /** + * Properties of a ValidationCA. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IValidationCA + * @property {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null} [grpcEndpoint] ValidationCA grpcEndpoint + * @property {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null} [certificateProviderInstance] ValidationCA certificateProviderInstance + */ + + /** + * Constructs a new ValidationCA. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a ValidationCA. + * @implements IValidationCA + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IValidationCA=} [properties] Properties to set + */ + function ValidationCA(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidationCA grpcEndpoint. + * @member {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null|undefined} grpcEndpoint + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @instance + */ + ValidationCA.prototype.grpcEndpoint = null; + + /** + * ValidationCA certificateProviderInstance. + * @member {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null|undefined} certificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @instance + */ + ValidationCA.prototype.certificateProviderInstance = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ValidationCA type. + * @member {"grpcEndpoint"|"certificateProviderInstance"|undefined} type + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @instance + */ + Object.defineProperty(ValidationCA.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["grpcEndpoint", "certificateProviderInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ValidationCA instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {google.cloud.networksecurity.v1beta1.IValidationCA=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA instance + */ + ValidationCA.create = function create(properties) { + return new ValidationCA(properties); + }; + + /** + * Encodes the specified ValidationCA message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ValidationCA.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {google.cloud.networksecurity.v1beta1.IValidationCA} message ValidationCA message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidationCA.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.grpcEndpoint != null && Object.hasOwnProperty.call(message, "grpcEndpoint")) + $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.encode(message.grpcEndpoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.certificateProviderInstance != null && Object.hasOwnProperty.call(message, "certificateProviderInstance")) + $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.encode(message.certificateProviderInstance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidationCA message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ValidationCA.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {google.cloud.networksecurity.v1beta1.IValidationCA} message ValidationCA message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidationCA.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidationCA message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidationCA.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ValidationCA(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.decode(reader, reader.uint32()); + break; + } + case 3: { + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidationCA message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidationCA.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidationCA message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidationCA.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify(message.grpcEndpoint); + if (error) + return "grpcEndpoint." + error; + } + } + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify(message.certificateProviderInstance); + if (error) + return "certificateProviderInstance." + error; + } + } + return null; + }; + + /** + * Creates a ValidationCA message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.ValidationCA} ValidationCA + */ + ValidationCA.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ValidationCA) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.ValidationCA(); + if (object.grpcEndpoint != null) { + if (typeof object.grpcEndpoint !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ValidationCA.grpcEndpoint: object expected"); + message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.fromObject(object.grpcEndpoint); + } + if (object.certificateProviderInstance != null) { + if (typeof object.certificateProviderInstance !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ValidationCA.certificateProviderInstance: object expected"); + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.fromObject(object.certificateProviderInstance); + } + return message; + }; + + /** + * Creates a plain object from a ValidationCA message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {google.cloud.networksecurity.v1beta1.ValidationCA} message ValidationCA + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidationCA.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + object.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.toObject(message.grpcEndpoint, options); + if (options.oneofs) + object.type = "grpcEndpoint"; + } + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + object.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.toObject(message.certificateProviderInstance, options); + if (options.oneofs) + object.type = "certificateProviderInstance"; + } + return object; + }; + + /** + * Converts this ValidationCA to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @instance + * @returns {Object.} JSON object + */ + ValidationCA.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ValidationCA + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.ValidationCA + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValidationCA.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ValidationCA"; + }; + + return ValidationCA; + })(); + + v1beta1.CertificateProviderInstance = (function() { + + /** + * Properties of a CertificateProviderInstance. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface ICertificateProviderInstance + * @property {string|null} [pluginInstance] CertificateProviderInstance pluginInstance + */ + + /** + * Constructs a new CertificateProviderInstance. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a CertificateProviderInstance. + * @implements ICertificateProviderInstance + * @constructor + * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance=} [properties] Properties to set + */ + function CertificateProviderInstance(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateProviderInstance pluginInstance. + * @member {string} pluginInstance + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @instance + */ + CertificateProviderInstance.prototype.pluginInstance = ""; + + /** + * Creates a new CertificateProviderInstance instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance instance + */ + CertificateProviderInstance.create = function create(properties) { + return new CertificateProviderInstance(properties); + }; + + /** + * Encodes the specified CertificateProviderInstance message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance} message CertificateProviderInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateProviderInstance.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pluginInstance != null && Object.hasOwnProperty.call(message, "pluginInstance")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pluginInstance); + return writer; + }; + + /** + * Encodes the specified CertificateProviderInstance message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance} message CertificateProviderInstance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateProviderInstance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateProviderInstance message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateProviderInstance.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pluginInstance = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateProviderInstance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateProviderInstance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateProviderInstance message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateProviderInstance.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pluginInstance != null && message.hasOwnProperty("pluginInstance")) + if (!$util.isString(message.pluginInstance)) + return "pluginInstance: string expected"; + return null; + }; + + /** + * Creates a CertificateProviderInstance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} CertificateProviderInstance + */ + CertificateProviderInstance.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance(); + if (object.pluginInstance != null) + message.pluginInstance = String(object.pluginInstance); + return message; + }; + + /** + * Creates a plain object from a CertificateProviderInstance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {google.cloud.networksecurity.v1beta1.CertificateProviderInstance} message CertificateProviderInstance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateProviderInstance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pluginInstance = ""; + if (message.pluginInstance != null && message.hasOwnProperty("pluginInstance")) + object.pluginInstance = message.pluginInstance; + return object; + }; + + /** + * Converts this CertificateProviderInstance to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @instance + * @returns {Object.} JSON object + */ + CertificateProviderInstance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CertificateProviderInstance + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.CertificateProviderInstance + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateProviderInstance.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CertificateProviderInstance"; + }; + + return CertificateProviderInstance; + })(); + + v1beta1.CertificateProvider = (function() { + + /** + * Properties of a CertificateProvider. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface ICertificateProvider + * @property {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null} [grpcEndpoint] CertificateProvider grpcEndpoint + * @property {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null} [certificateProviderInstance] CertificateProvider certificateProviderInstance + */ + + /** + * Constructs a new CertificateProvider. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a CertificateProvider. + * @implements ICertificateProvider + * @constructor + * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider=} [properties] Properties to set + */ + function CertificateProvider(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateProvider grpcEndpoint. + * @member {google.cloud.networksecurity.v1beta1.IGrpcEndpoint|null|undefined} grpcEndpoint + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @instance + */ + CertificateProvider.prototype.grpcEndpoint = null; + + /** + * CertificateProvider certificateProviderInstance. + * @member {google.cloud.networksecurity.v1beta1.ICertificateProviderInstance|null|undefined} certificateProviderInstance + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @instance + */ + CertificateProvider.prototype.certificateProviderInstance = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CertificateProvider type. + * @member {"grpcEndpoint"|"certificateProviderInstance"|undefined} type + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @instance + */ + Object.defineProperty(CertificateProvider.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["grpcEndpoint", "certificateProviderInstance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CertificateProvider instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider instance + */ + CertificateProvider.create = function create(properties) { + return new CertificateProvider(properties); + }; + + /** + * Encodes the specified CertificateProvider message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProvider.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider} message CertificateProvider message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateProvider.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.grpcEndpoint != null && Object.hasOwnProperty.call(message, "grpcEndpoint")) + $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.encode(message.grpcEndpoint, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.certificateProviderInstance != null && Object.hasOwnProperty.call(message, "certificateProviderInstance")) + $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.encode(message.certificateProviderInstance, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateProvider message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CertificateProvider.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {google.cloud.networksecurity.v1beta1.ICertificateProvider} message CertificateProvider message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateProvider.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateProvider message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateProvider.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CertificateProvider(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.decode(reader, reader.uint32()); + break; + } + case 3: { + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateProvider message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateProvider.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateProvider message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateProvider.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.verify(message.grpcEndpoint); + if (error) + return "grpcEndpoint." + error; + } + } + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.verify(message.certificateProviderInstance); + if (error) + return "certificateProviderInstance." + error; + } + } + return null; + }; + + /** + * Creates a CertificateProvider message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.CertificateProvider} CertificateProvider + */ + CertificateProvider.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.CertificateProvider) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.CertificateProvider(); + if (object.grpcEndpoint != null) { + if (typeof object.grpcEndpoint !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.CertificateProvider.grpcEndpoint: object expected"); + message.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.fromObject(object.grpcEndpoint); + } + if (object.certificateProviderInstance != null) { + if (typeof object.certificateProviderInstance !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.CertificateProvider.certificateProviderInstance: object expected"); + message.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.fromObject(object.certificateProviderInstance); + } + return message; + }; + + /** + * Creates a plain object from a CertificateProvider message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {google.cloud.networksecurity.v1beta1.CertificateProvider} message CertificateProvider + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateProvider.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.grpcEndpoint != null && message.hasOwnProperty("grpcEndpoint")) { + object.grpcEndpoint = $root.google.cloud.networksecurity.v1beta1.GrpcEndpoint.toObject(message.grpcEndpoint, options); + if (options.oneofs) + object.type = "grpcEndpoint"; + } + if (message.certificateProviderInstance != null && message.hasOwnProperty("certificateProviderInstance")) { + object.certificateProviderInstance = $root.google.cloud.networksecurity.v1beta1.CertificateProviderInstance.toObject(message.certificateProviderInstance, options); + if (options.oneofs) + object.type = "certificateProviderInstance"; + } + return object; + }; + + /** + * Converts this CertificateProvider to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @instance + * @returns {Object.} JSON object + */ + CertificateProvider.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CertificateProvider + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.CertificateProvider + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateProvider.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CertificateProvider"; + }; + + return CertificateProvider; + })(); + + v1beta1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networksecurity.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + 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.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.OperationMetadata) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.OperationMetadata.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.networksecurity.v1beta1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {google.cloud.networksecurity.v1beta1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + 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.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + v1beta1.NetworkSecurity = (function() { + + /** + * Constructs a new NetworkSecurity service. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a NetworkSecurity + * @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 NetworkSecurity(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (NetworkSecurity.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = NetworkSecurity; + + /** + * Creates new NetworkSecurity service using the specified rpc implementation. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @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 {NetworkSecurity} RPC service. Useful where requests and/or responses are streamed. + */ + NetworkSecurity.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|listAuthorizationPolicies}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef ListAuthorizationPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse} [response] ListAuthorizationPoliciesResponse + */ + + /** + * Calls ListAuthorizationPolicies. + * @function listAuthorizationPolicies + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} request ListAuthorizationPoliciesRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.ListAuthorizationPoliciesCallback} callback Node-style callback called with the error, if any, and ListAuthorizationPoliciesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.listAuthorizationPolicies = function listAuthorizationPolicies(request, callback) { + return this.rpcCall(listAuthorizationPolicies, $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest, $root.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse, request, callback); + }, "name", { value: "ListAuthorizationPolicies" }); + + /** + * Calls ListAuthorizationPolicies. + * @function listAuthorizationPolicies + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IListAuthorizationPoliciesRequest} request ListAuthorizationPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|getAuthorizationPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef GetAuthorizationPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1beta1.AuthorizationPolicy} [response] AuthorizationPolicy + */ + + /** + * Calls GetAuthorizationPolicy. + * @function getAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} request GetAuthorizationPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.GetAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and AuthorizationPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.getAuthorizationPolicy = function getAuthorizationPolicy(request, callback) { + return this.rpcCall(getAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest, $root.google.cloud.networksecurity.v1beta1.AuthorizationPolicy, request, callback); + }, "name", { value: "GetAuthorizationPolicy" }); + + /** + * Calls GetAuthorizationPolicy. + * @function getAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IGetAuthorizationPolicyRequest} request GetAuthorizationPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|createAuthorizationPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef CreateAuthorizationPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateAuthorizationPolicy. + * @function createAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} request CreateAuthorizationPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.createAuthorizationPolicy = function createAuthorizationPolicy(request, callback) { + return this.rpcCall(createAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateAuthorizationPolicy" }); + + /** + * Calls CreateAuthorizationPolicy. + * @function createAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.ICreateAuthorizationPolicyRequest} request CreateAuthorizationPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|updateAuthorizationPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef UpdateAuthorizationPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateAuthorizationPolicy. + * @function updateAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} request UpdateAuthorizationPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.updateAuthorizationPolicy = function updateAuthorizationPolicy(request, callback) { + return this.rpcCall(updateAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateAuthorizationPolicy" }); + + /** + * Calls UpdateAuthorizationPolicy. + * @function updateAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IUpdateAuthorizationPolicyRequest} request UpdateAuthorizationPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|deleteAuthorizationPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef DeleteAuthorizationPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteAuthorizationPolicy. + * @function deleteAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} request DeleteAuthorizationPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteAuthorizationPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.deleteAuthorizationPolicy = function deleteAuthorizationPolicy(request, callback) { + return this.rpcCall(deleteAuthorizationPolicy, $root.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteAuthorizationPolicy" }); + + /** + * Calls DeleteAuthorizationPolicy. + * @function deleteAuthorizationPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IDeleteAuthorizationPolicyRequest} request DeleteAuthorizationPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|listServerTlsPolicies}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef ListServerTlsPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} [response] ListServerTlsPoliciesResponse + */ + + /** + * Calls ListServerTlsPolicies. + * @function listServerTlsPolicies + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} request ListServerTlsPoliciesRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.ListServerTlsPoliciesCallback} callback Node-style callback called with the error, if any, and ListServerTlsPoliciesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.listServerTlsPolicies = function listServerTlsPolicies(request, callback) { + return this.rpcCall(listServerTlsPolicies, $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest, $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse, request, callback); + }, "name", { value: "ListServerTlsPolicies" }); + + /** + * Calls ListServerTlsPolicies. + * @function listServerTlsPolicies + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} request ListServerTlsPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|getServerTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef GetServerTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} [response] ServerTlsPolicy + */ + + /** + * Calls GetServerTlsPolicy. + * @function getServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} request GetServerTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.GetServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and ServerTlsPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.getServerTlsPolicy = function getServerTlsPolicy(request, callback) { + return this.rpcCall(getServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest, $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy, request, callback); + }, "name", { value: "GetServerTlsPolicy" }); + + /** + * Calls GetServerTlsPolicy. + * @function getServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} request GetServerTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|createServerTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef CreateServerTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateServerTlsPolicy. + * @function createServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} request CreateServerTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.createServerTlsPolicy = function createServerTlsPolicy(request, callback) { + return this.rpcCall(createServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateServerTlsPolicy" }); + + /** + * Calls CreateServerTlsPolicy. + * @function createServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} request CreateServerTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|updateServerTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef UpdateServerTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateServerTlsPolicy. + * @function updateServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} request UpdateServerTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.updateServerTlsPolicy = function updateServerTlsPolicy(request, callback) { + return this.rpcCall(updateServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateServerTlsPolicy" }); + + /** + * Calls UpdateServerTlsPolicy. + * @function updateServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} request UpdateServerTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|deleteServerTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef DeleteServerTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteServerTlsPolicy. + * @function deleteServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} request DeleteServerTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteServerTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.deleteServerTlsPolicy = function deleteServerTlsPolicy(request, callback) { + return this.rpcCall(deleteServerTlsPolicy, $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteServerTlsPolicy" }); + + /** + * Calls DeleteServerTlsPolicy. + * @function deleteServerTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} request DeleteServerTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|listClientTlsPolicies}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef ListClientTlsPoliciesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse} [response] ListClientTlsPoliciesResponse + */ + + /** + * Calls ListClientTlsPolicies. + * @function listClientTlsPolicies + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} request ListClientTlsPoliciesRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.ListClientTlsPoliciesCallback} callback Node-style callback called with the error, if any, and ListClientTlsPoliciesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.listClientTlsPolicies = function listClientTlsPolicies(request, callback) { + return this.rpcCall(listClientTlsPolicies, $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest, $root.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse, request, callback); + }, "name", { value: "ListClientTlsPolicies" }); + + /** + * Calls ListClientTlsPolicies. + * @function listClientTlsPolicies + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IListClientTlsPoliciesRequest} request ListClientTlsPoliciesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|getClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef GetClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.networksecurity.v1beta1.ClientTlsPolicy} [response] ClientTlsPolicy + */ + + /** + * Calls GetClientTlsPolicy. + * @function getClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} request GetClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.GetClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and ClientTlsPolicy + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.getClientTlsPolicy = function getClientTlsPolicy(request, callback) { + return this.rpcCall(getClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest, $root.google.cloud.networksecurity.v1beta1.ClientTlsPolicy, request, callback); + }, "name", { value: "GetClientTlsPolicy" }); + + /** + * Calls GetClientTlsPolicy. + * @function getClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IGetClientTlsPolicyRequest} request GetClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|createClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef CreateClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateClientTlsPolicy. + * @function createClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} request CreateClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.CreateClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.createClientTlsPolicy = function createClientTlsPolicy(request, callback) { + return this.rpcCall(createClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateClientTlsPolicy" }); + + /** + * Calls CreateClientTlsPolicy. + * @function createClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.ICreateClientTlsPolicyRequest} request CreateClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|updateClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef UpdateClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateClientTlsPolicy. + * @function updateClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} request UpdateClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.UpdateClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.updateClientTlsPolicy = function updateClientTlsPolicy(request, callback) { + return this.rpcCall(updateClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateClientTlsPolicy" }); + + /** + * Calls UpdateClientTlsPolicy. + * @function updateClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IUpdateClientTlsPolicyRequest} request UpdateClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.networksecurity.v1beta1.NetworkSecurity|deleteClientTlsPolicy}. + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @typedef DeleteClientTlsPolicyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteClientTlsPolicy. + * @function deleteClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} request DeleteClientTlsPolicyRequest message or plain object + * @param {google.cloud.networksecurity.v1beta1.NetworkSecurity.DeleteClientTlsPolicyCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(NetworkSecurity.prototype.deleteClientTlsPolicy = function deleteClientTlsPolicy(request, callback) { + return this.rpcCall(deleteClientTlsPolicy, $root.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteClientTlsPolicy" }); + + /** + * Calls DeleteClientTlsPolicy. + * @function deleteClientTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.NetworkSecurity + * @instance + * @param {google.cloud.networksecurity.v1beta1.IDeleteClientTlsPolicyRequest} request DeleteClientTlsPolicyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return NetworkSecurity; + })(); + + v1beta1.ServerTlsPolicy = (function() { + + /** + * Properties of a ServerTlsPolicy. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IServerTlsPolicy + * @property {string|null} [name] ServerTlsPolicy name + * @property {string|null} [description] ServerTlsPolicy description + * @property {google.protobuf.ITimestamp|null} [createTime] ServerTlsPolicy createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ServerTlsPolicy updateTime + * @property {Object.|null} [labels] ServerTlsPolicy labels + * @property {boolean|null} [allowOpen] ServerTlsPolicy allowOpen + * @property {google.cloud.networksecurity.v1beta1.ICertificateProvider|null} [serverCertificate] ServerTlsPolicy serverCertificate + * @property {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy|null} [mtlsPolicy] ServerTlsPolicy mtlsPolicy + */ + + /** + * Constructs a new ServerTlsPolicy. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a ServerTlsPolicy. + * @implements IServerTlsPolicy + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy=} [properties] Properties to set + */ + function ServerTlsPolicy(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServerTlsPolicy name. + * @member {string} name + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.name = ""; + + /** + * ServerTlsPolicy description. + * @member {string} description + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.description = ""; + + /** + * ServerTlsPolicy createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.createTime = null; + + /** + * ServerTlsPolicy updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.updateTime = null; + + /** + * ServerTlsPolicy labels. + * @member {Object.} labels + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.labels = $util.emptyObject; + + /** + * ServerTlsPolicy allowOpen. + * @member {boolean} allowOpen + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.allowOpen = false; + + /** + * ServerTlsPolicy serverCertificate. + * @member {google.cloud.networksecurity.v1beta1.ICertificateProvider|null|undefined} serverCertificate + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.serverCertificate = null; + + /** + * ServerTlsPolicy mtlsPolicy. + * @member {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy|null|undefined} mtlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + */ + ServerTlsPolicy.prototype.mtlsPolicy = null; + + /** + * Creates a new ServerTlsPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy instance + */ + ServerTlsPolicy.create = function create(properties) { + return new ServerTlsPolicy(properties); + }; + + /** + * Encodes the specified ServerTlsPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy} message ServerTlsPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerTlsPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.allowOpen != null && Object.hasOwnProperty.call(message, "allowOpen")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowOpen); + if (message.serverCertificate != null && Object.hasOwnProperty.call(message, "serverCertificate")) + $root.google.cloud.networksecurity.v1beta1.CertificateProvider.encode(message.serverCertificate, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.mtlsPolicy != null && Object.hasOwnProperty.call(message, "mtlsPolicy")) + $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.encode(message.mtlsPolicy, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServerTlsPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.IServerTlsPolicy} message ServerTlsPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServerTlsPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServerTlsPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerTlsPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 6: { + message.allowOpen = reader.bool(); + break; + } + case 7: { + message.serverCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.decode(reader, reader.uint32()); + break; + } + case 8: { + message.mtlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServerTlsPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServerTlsPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServerTlsPolicy message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServerTlsPolicy.verify = function verify(message) { + if (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.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.allowOpen != null && message.hasOwnProperty("allowOpen")) + if (typeof message.allowOpen !== "boolean") + return "allowOpen: boolean expected"; + if (message.serverCertificate != null && message.hasOwnProperty("serverCertificate")) { + var error = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.verify(message.serverCertificate); + if (error) + return "serverCertificate." + error; + } + if (message.mtlsPolicy != null && message.hasOwnProperty("mtlsPolicy")) { + var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.verify(message.mtlsPolicy); + if (error) + return "mtlsPolicy." + error; + } + return null; + }; + + /** + * Creates a ServerTlsPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} ServerTlsPolicy + */ + ServerTlsPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy(); + if (object.name != null) + message.name = String(object.name); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.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.networksecurity.v1beta1.ServerTlsPolicy.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + if (object.allowOpen != null) + message.allowOpen = Boolean(object.allowOpen); + if (object.serverCertificate != null) { + if (typeof object.serverCertificate !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.serverCertificate: object expected"); + message.serverCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.fromObject(object.serverCertificate); + } + if (object.mtlsPolicy != null) { + if (typeof object.mtlsPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.mtlsPolicy: object expected"); + message.mtlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.fromObject(object.mtlsPolicy); + } + return message; + }; + + /** + * Creates a plain object from a ServerTlsPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy} message ServerTlsPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServerTlsPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.allowOpen = false; + object.serverCertificate = null; + object.mtlsPolicy = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + 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); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.allowOpen != null && message.hasOwnProperty("allowOpen")) + object.allowOpen = message.allowOpen; + if (message.serverCertificate != null && message.hasOwnProperty("serverCertificate")) + object.serverCertificate = $root.google.cloud.networksecurity.v1beta1.CertificateProvider.toObject(message.serverCertificate, options); + if (message.mtlsPolicy != null && message.hasOwnProperty("mtlsPolicy")) + object.mtlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.toObject(message.mtlsPolicy, options); + return object; + }; + + /** + * Converts this ServerTlsPolicy to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @instance + * @returns {Object.} JSON object + */ + ServerTlsPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServerTlsPolicy + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServerTlsPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ServerTlsPolicy"; + }; + + ServerTlsPolicy.MTLSPolicy = (function() { + + /** + * Properties of a MTLSPolicy. + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @interface IMTLSPolicy + * @property {Array.|null} [clientValidationCa] MTLSPolicy clientValidationCa + */ + + /** + * Constructs a new MTLSPolicy. + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy + * @classdesc Represents a MTLSPolicy. + * @implements IMTLSPolicy + * @constructor + * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy=} [properties] Properties to set + */ + function MTLSPolicy(properties) { + this.clientValidationCa = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MTLSPolicy clientValidationCa. + * @member {Array.} clientValidationCa + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @instance + */ + MTLSPolicy.prototype.clientValidationCa = $util.emptyArray; + + /** + * Creates a new MTLSPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy instance + */ + MTLSPolicy.create = function create(properties) { + return new MTLSPolicy(properties); + }; + + /** + * Encodes the specified MTLSPolicy message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy} message MTLSPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MTLSPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientValidationCa != null && message.clientValidationCa.length) + for (var i = 0; i < message.clientValidationCa.length; ++i) + $root.google.cloud.networksecurity.v1beta1.ValidationCA.encode(message.clientValidationCa[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MTLSPolicy message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.IMTLSPolicy} message MTLSPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MTLSPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MTLSPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MTLSPolicy.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.clientValidationCa && message.clientValidationCa.length)) + message.clientValidationCa = []; + message.clientValidationCa.push($root.google.cloud.networksecurity.v1beta1.ValidationCA.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MTLSPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MTLSPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MTLSPolicy message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MTLSPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientValidationCa != null && message.hasOwnProperty("clientValidationCa")) { + if (!Array.isArray(message.clientValidationCa)) + return "clientValidationCa: array expected"; + for (var i = 0; i < message.clientValidationCa.length; ++i) { + var error = $root.google.cloud.networksecurity.v1beta1.ValidationCA.verify(message.clientValidationCa[i]); + if (error) + return "clientValidationCa." + error; + } + } + return null; + }; + + /** + * Creates a MTLSPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} MTLSPolicy + */ + MTLSPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy(); + if (object.clientValidationCa) { + if (!Array.isArray(object.clientValidationCa)) + throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.clientValidationCa: array expected"); + message.clientValidationCa = []; + for (var i = 0; i < object.clientValidationCa.length; ++i) { + if (typeof object.clientValidationCa[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy.clientValidationCa: object expected"); + message.clientValidationCa[i] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.fromObject(object.clientValidationCa[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MTLSPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy} message MTLSPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MTLSPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.clientValidationCa = []; + if (message.clientValidationCa && message.clientValidationCa.length) { + object.clientValidationCa = []; + for (var j = 0; j < message.clientValidationCa.length; ++j) + object.clientValidationCa[j] = $root.google.cloud.networksecurity.v1beta1.ValidationCA.toObject(message.clientValidationCa[j], options); + } + return object; + }; + + /** + * Converts this MTLSPolicy to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @instance + * @returns {Object.} JSON object + */ + MTLSPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MTLSPolicy + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MTLSPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ServerTlsPolicy.MTLSPolicy"; + }; + + return MTLSPolicy; + })(); + + return ServerTlsPolicy; + })(); + + v1beta1.ListServerTlsPoliciesRequest = (function() { + + /** + * Properties of a ListServerTlsPoliciesRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IListServerTlsPoliciesRequest + * @property {string|null} [parent] ListServerTlsPoliciesRequest parent + * @property {number|null} [pageSize] ListServerTlsPoliciesRequest pageSize + * @property {string|null} [pageToken] ListServerTlsPoliciesRequest pageToken + */ + + /** + * Constructs a new ListServerTlsPoliciesRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a ListServerTlsPoliciesRequest. + * @implements IListServerTlsPoliciesRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest=} [properties] Properties to set + */ + function ListServerTlsPoliciesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServerTlsPoliciesRequest parent. + * @member {string} parent + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @instance + */ + ListServerTlsPoliciesRequest.prototype.parent = ""; + + /** + * ListServerTlsPoliciesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @instance + */ + ListServerTlsPoliciesRequest.prototype.pageSize = 0; + + /** + * ListServerTlsPoliciesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @instance + */ + ListServerTlsPoliciesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListServerTlsPoliciesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest instance + */ + ListServerTlsPoliciesRequest.create = function create(properties) { + return new ListServerTlsPoliciesRequest(properties); + }; + + /** + * Encodes the specified ListServerTlsPoliciesRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} message ListServerTlsPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServerTlsPoliciesRequest.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 ListServerTlsPoliciesRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesRequest} message ListServerTlsPoliciesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServerTlsPoliciesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServerTlsPoliciesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServerTlsPoliciesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServerTlsPoliciesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServerTlsPoliciesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServerTlsPoliciesRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServerTlsPoliciesRequest.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 ListServerTlsPoliciesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} ListServerTlsPoliciesRequest + */ + ListServerTlsPoliciesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest(); + 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 ListServerTlsPoliciesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest} message ListServerTlsPoliciesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServerTlsPoliciesRequest.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 ListServerTlsPoliciesRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @instance + * @returns {Object.} JSON object + */ + ListServerTlsPoliciesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListServerTlsPoliciesRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServerTlsPoliciesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest"; + }; + + return ListServerTlsPoliciesRequest; + })(); + + v1beta1.ListServerTlsPoliciesResponse = (function() { + + /** + * Properties of a ListServerTlsPoliciesResponse. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IListServerTlsPoliciesResponse + * @property {Array.|null} [serverTlsPolicies] ListServerTlsPoliciesResponse serverTlsPolicies + * @property {string|null} [nextPageToken] ListServerTlsPoliciesResponse nextPageToken + */ + + /** + * Constructs a new ListServerTlsPoliciesResponse. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a ListServerTlsPoliciesResponse. + * @implements IListServerTlsPoliciesResponse + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse=} [properties] Properties to set + */ + function ListServerTlsPoliciesResponse(properties) { + this.serverTlsPolicies = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListServerTlsPoliciesResponse serverTlsPolicies. + * @member {Array.} serverTlsPolicies + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @instance + */ + ListServerTlsPoliciesResponse.prototype.serverTlsPolicies = $util.emptyArray; + + /** + * ListServerTlsPoliciesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @instance + */ + ListServerTlsPoliciesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListServerTlsPoliciesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse instance + */ + ListServerTlsPoliciesResponse.create = function create(properties) { + return new ListServerTlsPoliciesResponse(properties); + }; + + /** + * Encodes the specified ListServerTlsPoliciesResponse message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse} message ListServerTlsPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServerTlsPoliciesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serverTlsPolicies != null && message.serverTlsPolicies.length) + for (var i = 0; i < message.serverTlsPolicies.length; ++i) + $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.encode(message.serverTlsPolicies[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 ListServerTlsPoliciesResponse message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1beta1.IListServerTlsPoliciesResponse} message ListServerTlsPoliciesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListServerTlsPoliciesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListServerTlsPoliciesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServerTlsPoliciesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.serverTlsPolicies && message.serverTlsPolicies.length)) + message.serverTlsPolicies = []; + message.serverTlsPolicies.push($root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListServerTlsPoliciesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListServerTlsPoliciesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListServerTlsPoliciesResponse message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListServerTlsPoliciesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serverTlsPolicies != null && message.hasOwnProperty("serverTlsPolicies")) { + if (!Array.isArray(message.serverTlsPolicies)) + return "serverTlsPolicies: array expected"; + for (var i = 0; i < message.serverTlsPolicies.length; ++i) { + var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify(message.serverTlsPolicies[i]); + if (error) + return "serverTlsPolicies." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListServerTlsPoliciesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} ListServerTlsPoliciesResponse + */ + ListServerTlsPoliciesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse(); + if (object.serverTlsPolicies) { + if (!Array.isArray(object.serverTlsPolicies)) + throw TypeError(".google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.serverTlsPolicies: array expected"); + message.serverTlsPolicies = []; + for (var i = 0; i < object.serverTlsPolicies.length; ++i) { + if (typeof object.serverTlsPolicies[i] !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse.serverTlsPolicies: object expected"); + message.serverTlsPolicies[i] = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.fromObject(object.serverTlsPolicies[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListServerTlsPoliciesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse} message ListServerTlsPoliciesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListServerTlsPoliciesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.serverTlsPolicies = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.serverTlsPolicies && message.serverTlsPolicies.length) { + object.serverTlsPolicies = []; + for (var j = 0; j < message.serverTlsPolicies.length; ++j) + object.serverTlsPolicies[j] = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.toObject(message.serverTlsPolicies[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListServerTlsPoliciesResponse to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @instance + * @returns {Object.} JSON object + */ + ListServerTlsPoliciesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListServerTlsPoliciesResponse + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListServerTlsPoliciesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse"; + }; + + return ListServerTlsPoliciesResponse; + })(); + + v1beta1.GetServerTlsPolicyRequest = (function() { + + /** + * Properties of a GetServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IGetServerTlsPolicyRequest + * @property {string|null} [name] GetServerTlsPolicyRequest name + */ + + /** + * Constructs a new GetServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a GetServerTlsPolicyRequest. + * @implements IGetServerTlsPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest=} [properties] Properties to set + */ + function GetServerTlsPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetServerTlsPolicyRequest name. + * @member {string} name + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @instance + */ + GetServerTlsPolicyRequest.prototype.name = ""; + + /** + * Creates a new GetServerTlsPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest instance + */ + GetServerTlsPolicyRequest.create = function create(properties) { + return new GetServerTlsPolicyRequest(properties); + }; + + /** + * Encodes the specified GetServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} message GetServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServerTlsPolicyRequest.encode = function encode(message, writer) { + 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 GetServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IGetServerTlsPolicyRequest} message GetServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetServerTlsPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServerTlsPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetServerTlsPolicyRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetServerTlsPolicyRequest.verify = function verify(message) { + if (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 GetServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} GetServerTlsPolicyRequest + */ + GetServerTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetServerTlsPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest} message GetServerTlsPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetServerTlsPolicyRequest.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 GetServerTlsPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + GetServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetServerTlsPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest"; + }; + + return GetServerTlsPolicyRequest; + })(); + + v1beta1.CreateServerTlsPolicyRequest = (function() { + + /** + * Properties of a CreateServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface ICreateServerTlsPolicyRequest + * @property {string|null} [parent] CreateServerTlsPolicyRequest parent + * @property {string|null} [serverTlsPolicyId] CreateServerTlsPolicyRequest serverTlsPolicyId + * @property {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null} [serverTlsPolicy] CreateServerTlsPolicyRequest serverTlsPolicy + */ + + /** + * Constructs a new CreateServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a CreateServerTlsPolicyRequest. + * @implements ICreateServerTlsPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest=} [properties] Properties to set + */ + function CreateServerTlsPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateServerTlsPolicyRequest parent. + * @member {string} parent + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @instance + */ + CreateServerTlsPolicyRequest.prototype.parent = ""; + + /** + * CreateServerTlsPolicyRequest serverTlsPolicyId. + * @member {string} serverTlsPolicyId + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @instance + */ + CreateServerTlsPolicyRequest.prototype.serverTlsPolicyId = ""; + + /** + * CreateServerTlsPolicyRequest serverTlsPolicy. + * @member {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null|undefined} serverTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @instance + */ + CreateServerTlsPolicyRequest.prototype.serverTlsPolicy = null; + + /** + * Creates a new CreateServerTlsPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest instance + */ + CreateServerTlsPolicyRequest.create = function create(properties) { + return new CreateServerTlsPolicyRequest(properties); + }; + + /** + * Encodes the specified CreateServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} message CreateServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServerTlsPolicyRequest.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.serverTlsPolicyId != null && Object.hasOwnProperty.call(message, "serverTlsPolicyId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.serverTlsPolicyId); + if (message.serverTlsPolicy != null && Object.hasOwnProperty.call(message, "serverTlsPolicy")) + $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.encode(message.serverTlsPolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.ICreateServerTlsPolicyRequest} message CreateServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateServerTlsPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServerTlsPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.serverTlsPolicyId = reader.string(); + break; + } + case 3: { + message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateServerTlsPolicyRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateServerTlsPolicyRequest.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.serverTlsPolicyId != null && message.hasOwnProperty("serverTlsPolicyId")) + if (!$util.isString(message.serverTlsPolicyId)) + return "serverTlsPolicyId: string expected"; + if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) { + var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify(message.serverTlsPolicy); + if (error) + return "serverTlsPolicy." + error; + } + return null; + }; + + /** + * Creates a CreateServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} CreateServerTlsPolicyRequest + */ + CreateServerTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.serverTlsPolicyId != null) + message.serverTlsPolicyId = String(object.serverTlsPolicyId); + if (object.serverTlsPolicy != null) { + if (typeof object.serverTlsPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest.serverTlsPolicy: object expected"); + message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.fromObject(object.serverTlsPolicy); + } + return message; + }; + + /** + * Creates a plain object from a CreateServerTlsPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest} message CreateServerTlsPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateServerTlsPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.serverTlsPolicyId = ""; + object.serverTlsPolicy = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.serverTlsPolicyId != null && message.hasOwnProperty("serverTlsPolicyId")) + object.serverTlsPolicyId = message.serverTlsPolicyId; + if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) + object.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.toObject(message.serverTlsPolicy, options); + return object; + }; + + /** + * Converts this CreateServerTlsPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + CreateServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateServerTlsPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest"; + }; + + return CreateServerTlsPolicyRequest; + })(); + + v1beta1.UpdateServerTlsPolicyRequest = (function() { + + /** + * Properties of an UpdateServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IUpdateServerTlsPolicyRequest + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateServerTlsPolicyRequest updateMask + * @property {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null} [serverTlsPolicy] UpdateServerTlsPolicyRequest serverTlsPolicy + */ + + /** + * Constructs a new UpdateServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents an UpdateServerTlsPolicyRequest. + * @implements IUpdateServerTlsPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest=} [properties] Properties to set + */ + function UpdateServerTlsPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateServerTlsPolicyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @instance + */ + UpdateServerTlsPolicyRequest.prototype.updateMask = null; + + /** + * UpdateServerTlsPolicyRequest serverTlsPolicy. + * @member {google.cloud.networksecurity.v1beta1.IServerTlsPolicy|null|undefined} serverTlsPolicy + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @instance + */ + UpdateServerTlsPolicyRequest.prototype.serverTlsPolicy = null; + + /** + * Creates a new UpdateServerTlsPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest instance + */ + UpdateServerTlsPolicyRequest.create = function create(properties) { + return new UpdateServerTlsPolicyRequest(properties); + }; + + /** + * Encodes the specified UpdateServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} message UpdateServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServerTlsPolicyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.serverTlsPolicy != null && Object.hasOwnProperty.call(message, "serverTlsPolicy")) + $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.encode(message.serverTlsPolicy, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IUpdateServerTlsPolicyRequest} message UpdateServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateServerTlsPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServerTlsPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 2: { + message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateServerTlsPolicyRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateServerTlsPolicyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) { + var error = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.verify(message.serverTlsPolicy); + if (error) + return "serverTlsPolicy." + error; + } + return null; + }; + + /** + * Creates an UpdateServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} UpdateServerTlsPolicyRequest + */ + UpdateServerTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest(); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.serverTlsPolicy != null) { + if (typeof object.serverTlsPolicy !== "object") + throw TypeError(".google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest.serverTlsPolicy: object expected"); + message.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.fromObject(object.serverTlsPolicy); + } + return message; + }; + + /** + * Creates a plain object from an UpdateServerTlsPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest} message UpdateServerTlsPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateServerTlsPolicyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.updateMask = null; + object.serverTlsPolicy = null; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.serverTlsPolicy != null && message.hasOwnProperty("serverTlsPolicy")) + object.serverTlsPolicy = $root.google.cloud.networksecurity.v1beta1.ServerTlsPolicy.toObject(message.serverTlsPolicy, options); + return object; + }; + + /** + * Converts this UpdateServerTlsPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateServerTlsPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest"; + }; + + return UpdateServerTlsPolicyRequest; + })(); + + v1beta1.DeleteServerTlsPolicyRequest = (function() { + + /** + * Properties of a DeleteServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @interface IDeleteServerTlsPolicyRequest + * @property {string|null} [name] DeleteServerTlsPolicyRequest name + */ + + /** + * Constructs a new DeleteServerTlsPolicyRequest. + * @memberof google.cloud.networksecurity.v1beta1 + * @classdesc Represents a DeleteServerTlsPolicyRequest. + * @implements IDeleteServerTlsPolicyRequest + * @constructor + * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest=} [properties] Properties to set + */ + function DeleteServerTlsPolicyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteServerTlsPolicyRequest name. + * @member {string} name + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @instance + */ + DeleteServerTlsPolicyRequest.prototype.name = ""; + + /** + * Creates a new DeleteServerTlsPolicyRequest instance using the specified properties. + * @function create + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest=} [properties] Properties to set + * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest instance + */ + DeleteServerTlsPolicyRequest.create = function create(properties) { + return new DeleteServerTlsPolicyRequest(properties); + }; + + /** + * Encodes the specified DeleteServerTlsPolicyRequest message. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} message DeleteServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServerTlsPolicyRequest.encode = function encode(message, writer) { + 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 DeleteServerTlsPolicyRequest message, length delimited. Does not implicitly {@link google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.IDeleteServerTlsPolicyRequest} message DeleteServerTlsPolicyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteServerTlsPolicyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteServerTlsPolicyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServerTlsPolicyRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteServerTlsPolicyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteServerTlsPolicyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteServerTlsPolicyRequest message. + * @function verify + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteServerTlsPolicyRequest.verify = function verify(message) { + if (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 DeleteServerTlsPolicyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} DeleteServerTlsPolicyRequest + */ + DeleteServerTlsPolicyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest) + return object; + var message = new $root.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteServerTlsPolicyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest} message DeleteServerTlsPolicyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteServerTlsPolicyRequest.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 DeleteServerTlsPolicyRequest to JSON. + * @function toJSON + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteServerTlsPolicyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteServerTlsPolicyRequest + * @function getTypeUrl + * @memberof google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteServerTlsPolicyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest"; + }; + + return DeleteServerTlsPolicyRequest; + })(); + + return v1beta1; + })(); + + return networksecurity; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; /** * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. @@ -19195,6 +22840,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -19229,6 +22875,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -19261,6 +22915,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -19312,6 +22968,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -19363,6 +23023,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -19405,6 +23070,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -19423,8 +23093,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -19432,6 +23104,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -21254,6 +24928,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -21279,6 +24954,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -21305,6 +24988,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -21345,6 +25030,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -21385,6 +25074,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -21405,6 +25099,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -21421,38 +25120,294 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, 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); - }; + /** + * 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"; + }; + + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; - /** - * 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 ExperimentalFeatures; + })(); return PythonSettings; })(); @@ -22330,6 +26285,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -22341,6 +26297,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22355,6 +26312,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -22381,6 +26346,9 @@ 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(); return writer; }; @@ -22411,7 +26379,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -22421,6 +26389,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -22461,6 +26452,14 @@ 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"; + } return null; }; @@ -22481,6 +26480,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -22497,10 +26503,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -23094,49 +27108,294 @@ return LongRunning; })(); - return MethodSettings; - })(); + 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; + })(); + + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * 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; - })(); + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; - /** - * 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; + return SelectiveGapicGeneration; })(); /** @@ -23408,6 +27667,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -23422,6 +27682,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -23446,6 +27707,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -23468,6 +27730,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -23518,6 +27781,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -23639,6 +27910,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -23711,6 +27985,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -23813,6 +28093,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -23867,6 +28154,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -23919,6 +28207,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -23982,6 +28277,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -24047,6 +28346,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -24103,6 +28403,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -24151,6 +28456,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -24256,6 +28562,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -24308,6 +28622,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -24400,6 +28716,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -24513,6 +28833,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -24612,6 +28941,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -24641,6 +28990,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -24686,6 +29036,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -26730,6 +31082,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -26790,6 +31143,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -26827,6 +31188,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -26889,6 +31252,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -26957,6 +31324,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -27006,6 +31382,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -27030,6 +31426,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -27050,6 +31447,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -29368,6 +33767,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -29488,6 +33888,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -29562,6 +33970,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -29587,672 +33997,989 @@ }; /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.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 {$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 + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) + 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; - 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(); + } + 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; } - case 15: { - message.unverifiedLazy = reader.bool(); + } + 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.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + 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; } - case 3: { - message.deprecated = reader.bool(); + } + 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 10: { - message.weak = reader.bool(); + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; break; - } - case 16: { - message.debugRedact = reader.bool(); + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; break; - } - case 17: { - message.retention = reader.int32(); + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; 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()); + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; 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()); + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; 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 (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 (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 (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.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + 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 (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]) { + } + 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: - return "targets: enum value[] expected"; + 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: - case 9: + message[".google.api.fieldBehavior"][i] = 8; 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 (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.featureSupport = null; + object[".google.api.resourceReference"] = null; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; + 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.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.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[".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.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, 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.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; + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; } - return null; + 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; }; /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject + * 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 {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - 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; + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - 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; + 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]]; } - 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]; + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); break; } - case "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]; + case 2: { + message.value = reader.string(); 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; + default: + reader.skipType(tag & 7); break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; + } + } + 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 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: 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); - }; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; - /** - * 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"; - }; + /** + * 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_LEGACY": + case 900: + message.edition = 900; + 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; + }; - /** - * 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; - })(); + /** + * 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; + }; - /** - * 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; - })(); + /** + * 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); + }; - /** - * 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; - })(); + /** + * 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"; + }; - /** - * 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; + return EditionDefault; })(); - FieldOptions.EditionDefault = (function() { + FieldOptions.FeatureSupport = (function() { /** - * Properties of an EditionDefault. + * Properties of a FeatureSupport. * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved */ /** - * Constructs a new EditionDefault. + * Constructs a new FeatureSupport. * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set */ - function EditionDefault(properties) { + function FeatureSupport(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -30260,91 +34987,119 @@ } /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance */ - EditionDefault.prototype.edition = 0; + FeatureSupport.prototype.editionIntroduced = 0; /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance */ - EditionDefault.prototype.value = ""; + FeatureSupport.prototype.editionDeprecated = 0; /** - * Creates a new EditionDefault instance using the specified properties. + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); }; /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encode = function encode(message, writer) { + FeatureSupport.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); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); return writer; }; /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an EditionDefault message from the specified reader or buffer. + * Decodes a FeatureSupport message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @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 + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EditionDefault.decode = function decode(reader, length, error) { + FeatureSupport.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); + case 1: { + message.editionIntroduced = reader.int32(); break; } case 2: { - message.value = reader.string(); + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); break; } default: @@ -30356,37 +35111,77 @@ }; /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport * @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) { + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an EditionDefault message. + * Verifies a FeatureSupport message. * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @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) { + FeatureSupport.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { default: - return "edition: enum value expected"; + return "editionIntroduced: enum value expected"; case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: case 998: case 999: case 1000: @@ -30399,132 +35194,251 @@ 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. + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { default: - if (typeof object.edition === "number") { - message.edition = object.edition; + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; break; } break; case "EDITION_UNKNOWN": case 0: - message.edition = 0; + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; break; case "EDITION_PROTO2": case 998: - message.edition = 998; + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; break; case "EDITION_PROTO3": case 999: - message.edition = 999; + message.editionRemoved = 999; break; case "EDITION_2023": case 1000: - message.edition = 1000; + message.editionRemoved = 1000; break; case "EDITION_2024": case 1001: - message.edition = 1001; + message.editionRemoved = 1001; break; case "EDITION_1_TEST_ONLY": case 1: - message.edition = 1; + message.editionRemoved = 1; break; case "EDITION_2_TEST_ONLY": case 2: - message.edition = 2; + message.editionRemoved = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: - message.edition = 99997; + message.editionRemoved = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: - message.edition = 99998; + message.editionRemoved = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: - message.edition = 99999; + message.editionRemoved = 99999; break; case "EDITION_MAX": case 2147483647: - message.edition = 2147483647; + message.editionRemoved = 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. + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + FeatureSupport.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; + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; /** - * Converts this EditionDefault to JSON. + * Converts this FeatureSupport to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance * @returns {Object.} JSON object */ - EditionDefault.prototype.toJSON = function toJSON() { + FeatureSupport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EditionDefault + * Gets the default type url for FeatureSupport * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; }; - return EditionDefault; + return FeatureSupport; })(); return FieldOptions; @@ -31119,6 +36033,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -31162,6 +36077,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -31200,6 +36123,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -31251,6 +36176,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -31303,6 +36232,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -31336,6 +36270,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -31368,6 +36307,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -31375,6 +36315,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -32842,6 +37784,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -32907,6 +37851,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -32943,6 +37903,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -33003,6 +37967,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -33093,6 +38065,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -33232,6 +38224,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -33255,6 +38295,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -33268,6 +38310,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -33395,6 +38441,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -33579,6 +38838,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -33596,6 +38856,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -33644,6 +38905,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -33696,6 +38961,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -33804,7 +39073,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -33831,12 +39101,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -33862,10 +39140,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -33906,8 +39186,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -33950,6 +39234,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -33962,10 +39247,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -33993,6 +39283,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -34034,10 +39328,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -34056,13 +39355,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -35277,6 +40579,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.FieldMask = (function() { /** diff --git a/packages/google-cloud-networksecurity/protos/protos.json b/packages/google-cloud-networksecurity/protos/protos.json index 480c1179ca0a..51a5ff52f7ab 100644 --- a/packages/google-cloud-networksecurity/protos/protos.json +++ b/packages/google-cloud-networksecurity/protos/protos.json @@ -1098,6 +1098,457 @@ } } }, + "v1alpha1": { + "options": { + "csharp_namespace": "Google.Cloud.NetworkSecurity.V1Alpha1", + "go_package": "cloud.google.com/go/networksecurity/apiv1alpha1/networksecuritypb;networksecuritypb", + "java_multiple_files": true, + "java_outer_classname": "CommonProto", + "java_package": "com.google.cloud.networksecurity.v1alpha1", + "php_namespace": "Google\\Cloud\\NetworkSecurity\\V1alpha1", + "ruby_package": "Google::Cloud::NetworkSecurity::V1alpha1" + }, + "nested": { + "ClientTlsPolicy": { + "options": { + "(google.api.resource).type": "networksecurity.googleapis.com/ClientTlsPolicy", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sni": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clientCertificate": { + "type": "CertificateProvider", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serverValidationCa": { + "rule": "repeated", + "type": "ValidationCA", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListClientTlsPoliciesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "networksecurity.googleapis.com/ClientTlsPolicy" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListClientTlsPoliciesResponse": { + "fields": { + "clientTlsPolicies": { + "rule": "repeated", + "type": "ClientTlsPolicy", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetClientTlsPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networksecurity.googleapis.com/ClientTlsPolicy" + } + } + } + }, + "CreateClientTlsPolicyRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "networksecurity.googleapis.com/ClientTlsPolicy" + } + }, + "clientTlsPolicyId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "clientTlsPolicy": { + "type": "ClientTlsPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateClientTlsPolicyRequest": { + "fields": { + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clientTlsPolicy": { + "type": "ClientTlsPolicy", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteClientTlsPolicyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "networksecurity.googleapis.com/ClientTlsPolicy" + } + } + } + }, + "GrpcEndpoint": { + "fields": { + "targetUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ValidationCA": { + "oneofs": { + "type": { + "oneof": [ + "caCertPath", + "grpcEndpoint", + "certificateProviderInstance" + ] + } + }, + "fields": { + "caCertPath": { + "type": "string", + "id": 1 + }, + "grpcEndpoint": { + "type": "GrpcEndpoint", + "id": 2 + }, + "certificateProviderInstance": { + "type": "CertificateProviderInstance", + "id": 3 + } + } + }, + "CertificateProviderInstance": { + "fields": { + "pluginInstance": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CertificateProvider": { + "oneofs": { + "type": { + "oneof": [ + "localFilepath", + "grpcEndpoint", + "certificateProviderInstance" + ] + } + }, + "fields": { + "localFilepath": { + "type": "TlsCertificateFiles", + "id": 1 + }, + "grpcEndpoint": { + "type": "GrpcEndpoint", + "id": 2 + }, + "certificateProviderInstance": { + "type": "CertificateProviderInstance", + "id": 3 + } + }, + "nested": { + "TlsCertificateFiles": { + "fields": { + "certificatePath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "privateKeyPath": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "OperationMetadata": { + "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" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "NetworkSecurity": { + "options": { + "(google.api.default_host)": "networksecurity.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListClientTlsPolicies": { + "requestType": "ListClientTlsPoliciesRequest", + "responseType": "ListClientTlsPoliciesResponse", + "options": { + "(google.api.http).get": "/v1alpha1/{parent=projects/*/locations/*}/clientTlsPolicies", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha1/{parent=projects/*/locations/*}/clientTlsPolicies" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetClientTlsPolicy": { + "requestType": "GetClientTlsPolicyRequest", + "responseType": "ClientTlsPolicy", + "options": { + "(google.api.http).get": "/v1alpha1/{name=projects/*/locations/*/clientTlsPolicies/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha1/{name=projects/*/locations/*/clientTlsPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateClientTlsPolicy": { + "requestType": "CreateClientTlsPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1alpha1/{parent=projects/*/locations/*}/clientTlsPolicies", + "(google.api.http).body": "client_tls_policy", + "(google.api.method_signature)": "parent,client_tls_policy,client_tls_policy_id", + "(google.longrunning.operation_info).response_type": "ClientTlsPolicy", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networksecurity.v1alpha1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha1/{parent=projects/*/locations/*}/clientTlsPolicies", + "body": "client_tls_policy" + } + }, + { + "(google.api.method_signature)": "parent,client_tls_policy,client_tls_policy_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ClientTlsPolicy", + "metadata_type": "google.cloud.networksecurity.v1alpha1.OperationMetadata" + } + } + ] + }, + "UpdateClientTlsPolicy": { + "requestType": "UpdateClientTlsPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1alpha1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}", + "(google.api.http).body": "client_tls_policy", + "(google.api.method_signature)": "client_tls_policy,update_mask", + "(google.longrunning.operation_info).response_type": "ClientTlsPolicy", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networksecurity.v1alpha1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha1/{client_tls_policy.name=projects/*/locations/*/clientTlsPolicies/*}", + "body": "client_tls_policy" + } + }, + { + "(google.api.method_signature)": "client_tls_policy,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ClientTlsPolicy", + "metadata_type": "google.cloud.networksecurity.v1alpha1.OperationMetadata" + } + } + ] + }, + "DeleteClientTlsPolicy": { + "requestType": "DeleteClientTlsPolicyRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1alpha1/{name=projects/*/locations/*/clientTlsPolicies/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.networksecurity.v1alpha1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha1/{name=projects/*/locations/*/clientTlsPolicies/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.networksecurity.v1alpha1.OperationMetadata" + } + } + ] + } + } + } + } + }, "v1beta1": { "options": { "csharp_namespace": "Google.Cloud.NetworkSecurity.V1Beta1", @@ -2200,8 +2651,7 @@ "java_multiple_files": true, "java_outer_classname": "LaunchStageProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "fieldBehavior": { @@ -2424,6 +2874,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -2564,6 +3018,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -2621,6 +3097,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -2682,6 +3163,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -2715,12 +3209,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -2759,6 +3260,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -2847,6 +3353,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -3072,6 +3582,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -3286,6 +3800,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -3421,7 +3936,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -3449,6 +3965,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3518,6 +4038,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -3606,6 +4146,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3748,6 +4292,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -3758,6 +4303,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -3768,6 +4314,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -3778,6 +4325,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -3788,7 +4336,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -3798,27 +4347,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -3863,7 +4423,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -3878,6 +4444,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -3905,11 +4498,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -3922,6 +4530,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -4007,6 +4621,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "FieldMask": { "fields": { "paths": { @@ -4065,6 +4687,7 @@ "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", "php_namespace": "Google\\LongRunning" }, "nested": { diff --git a/packages/google-cloud-networksecurity/samples/README.md b/packages/google-cloud-networksecurity/samples/README.md index 852e9b74da1c..ffb9e9392541 100644 --- a/packages/google-cloud-networksecurity/samples/README.md +++ b/packages/google-cloud-networksecurity/samples/README.md @@ -27,6 +27,11 @@ * [Network_security.update_authorization_policy](#network_security.update_authorization_policy) * [Network_security.update_client_tls_policy](#network_security.update_client_tls_policy) * [Network_security.update_server_tls_policy](#network_security.update_server_tls_policy) + * [Network_security.create_client_tls_policy](#network_security.create_client_tls_policy) + * [Network_security.delete_client_tls_policy](#network_security.delete_client_tls_policy) + * [Network_security.get_client_tls_policy](#network_security.get_client_tls_policy) + * [Network_security.list_client_tls_policies](#network_security.list_client_tls_policies) + * [Network_security.update_client_tls_policy](#network_security.update_client_tls_policy) * [Network_security.create_authorization_policy](#network_security.create_authorization_policy) * [Network_security.create_client_tls_policy](#network_security.create_client_tls_policy) * [Network_security.create_server_tls_policy](#network_security.create_server_tls_policy) @@ -314,6 +319,91 @@ __Usage:__ +### Network_security.create_client_tls_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js` + + +----- + + + + +### Network_security.delete_client_tls_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js` + + +----- + + + + +### Network_security.get_client_tls_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js` + + +----- + + + + +### Network_security.list_client_tls_policies + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js` + + +----- + + + + +### Network_security.update_client_tls_policy + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js` + + +----- + + + + ### Network_security.create_authorization_policy View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-networksecurity/samples/generated/v1beta1/network_security.create_authorization_policy.js). diff --git a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json index f91168b68a44..d4cbf7f2e06d 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata.google.cloud.networksecurity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json index f91168b68a44..d4cbf7f2e06d 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1/snippet_metadata_google.cloud.networksecurity.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js new file mode 100644 index 000000000000..f72cb73893d2 --- /dev/null +++ b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.create_client_tls_policy.js @@ -0,0 +1,76 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, clientTlsPolicyId, clientTlsPolicy) { + // [START networksecurity_v1alpha1_generated_NetworkSecurity_CreateClientTlsPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 of the ClientTlsPolicy. Must be in + * the format `projects/* /locations/{location}`. + */ + // const parent = 'abc123' + /** + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". + */ + // const clientTlsPolicyId = 'abc123' + /** + * Required. ClientTlsPolicy resource to be created. + */ + // const clientTlsPolicy = {} + + // Imports the Networksecurity library + const {NetworkSecurityClient} = require('@google-cloud/networksecurity').v1alpha1; + + // Instantiates a client + const networksecurityClient = new NetworkSecurityClient(); + + async function callCreateClientTlsPolicy() { + // Construct request + const request = { + parent, + clientTlsPolicyId, + clientTlsPolicy, + }; + + // Run request + const [operation] = await networksecurityClient.createClientTlsPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateClientTlsPolicy(); + // [END networksecurity_v1alpha1_generated_NetworkSecurity_CreateClientTlsPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js new file mode 100644 index 000000000000..7ac57fbe040a --- /dev/null +++ b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.delete_client_tls_policy.js @@ -0,0 +1,63 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START networksecurity_v1alpha1_generated_NetworkSecurity_DeleteClientTlsPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/* /locations/{location}/clientTlsPolicies/*`. + */ + // const name = 'abc123' + + // Imports the Networksecurity library + const {NetworkSecurityClient} = require('@google-cloud/networksecurity').v1alpha1; + + // Instantiates a client + const networksecurityClient = new NetworkSecurityClient(); + + async function callDeleteClientTlsPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await networksecurityClient.deleteClientTlsPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteClientTlsPolicy(); + // [END networksecurity_v1alpha1_generated_NetworkSecurity_DeleteClientTlsPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js new file mode 100644 index 000000000000..6b62aaaf0de1 --- /dev/null +++ b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.get_client_tls_policy.js @@ -0,0 +1,62 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START networksecurity_v1alpha1_generated_NetworkSecurity_GetClientTlsPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/* /locations/{location}/clientTlsPolicies/*`. + */ + // const name = 'abc123' + + // Imports the Networksecurity library + const {NetworkSecurityClient} = require('@google-cloud/networksecurity').v1alpha1; + + // Instantiates a client + const networksecurityClient = new NetworkSecurityClient(); + + async function callGetClientTlsPolicy() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await networksecurityClient.getClientTlsPolicy(request); + console.log(response); + } + + callGetClientTlsPolicy(); + // [END networksecurity_v1alpha1_generated_NetworkSecurity_GetClientTlsPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js new file mode 100644 index 000000000000..1cc6bbae5513 --- /dev/null +++ b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.list_client_tls_policies.js @@ -0,0 +1,75 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 networksecurity_v1alpha1_generated_NetworkSecurity_ListClientTlsPolicies_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/* /locations/{location}`. + */ + // const parent = 'abc123' + /** + * Maximum number of ClientTlsPolicies to return per call. + */ + // const pageSize = 1234 + /** + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + */ + // const pageToken = 'abc123' + + // Imports the Networksecurity library + const {NetworkSecurityClient} = require('@google-cloud/networksecurity').v1alpha1; + + // Instantiates a client + const networksecurityClient = new NetworkSecurityClient(); + + async function callListClientTlsPolicies() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = networksecurityClient.listClientTlsPoliciesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListClientTlsPolicies(); + // [END networksecurity_v1alpha1_generated_NetworkSecurity_ListClientTlsPolicies_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js new file mode 100644 index 000000000000..52e2cd8043c2 --- /dev/null +++ b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/network_security.update_client_tls_policy.js @@ -0,0 +1,71 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(clientTlsPolicy) { + // [START networksecurity_v1alpha1_generated_NetworkSecurity_UpdateClientTlsPolicy_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + */ + // const updateMask = {} + /** + * Required. Updated ClientTlsPolicy resource. + */ + // const clientTlsPolicy = {} + + // Imports the Networksecurity library + const {NetworkSecurityClient} = require('@google-cloud/networksecurity').v1alpha1; + + // Instantiates a client + const networksecurityClient = new NetworkSecurityClient(); + + async function callUpdateClientTlsPolicy() { + // Construct request + const request = { + clientTlsPolicy, + }; + + // Run request + const [operation] = await networksecurityClient.updateClientTlsPolicy(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateClientTlsPolicy(); + // [END networksecurity_v1alpha1_generated_NetworkSecurity_UpdateClientTlsPolicy_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-networksecurity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networksecurity.v1alpha1.json b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networksecurity.v1alpha1.json new file mode 100644 index 000000000000..5ecd3213e119 --- /dev/null +++ b/packages/google-cloud-networksecurity/samples/generated/v1alpha1/snippet_metadata_google.cloud.networksecurity.v1alpha1.json @@ -0,0 +1,235 @@ +{ + "clientLibrary": { + "name": "nodejs-networksecurity", + "version": "3.3.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.networksecurity.v1alpha1", + "version": "v1alpha1" + } + ] + }, + "snippets": [ + { + "regionTag": "networksecurity_v1alpha1_generated_NetworkSecurity_ListClientTlsPolicies_async", + "title": "NetworkSecurity listClientTlsPolicies Sample", + "origin": "API_DEFINITION", + "description": " Lists ClientTlsPolicies in a given project and location.", + "canonical": true, + "file": "network_security.list_client_tls_policies.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListClientTlsPolicies", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.ListClientTlsPolicies", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesResponse", + "client": { + "shortName": "NetworkSecurityClient", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurityClient" + }, + "method": { + "shortName": "ListClientTlsPolicies", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.ListClientTlsPolicies", + "service": { + "shortName": "NetworkSecurity", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity" + } + } + } + }, + { + "regionTag": "networksecurity_v1alpha1_generated_NetworkSecurity_GetClientTlsPolicy_async", + "title": "NetworkSecurity getClientTlsPolicy Sample", + "origin": "API_DEFINITION", + "description": " Gets details of a single ClientTlsPolicy.", + "canonical": true, + "file": "network_security.get_client_tls_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.GetClientTlsPolicy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy", + "client": { + "shortName": "NetworkSecurityClient", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurityClient" + }, + "method": { + "shortName": "GetClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.GetClientTlsPolicy", + "service": { + "shortName": "NetworkSecurity", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity" + } + } + } + }, + { + "regionTag": "networksecurity_v1alpha1_generated_NetworkSecurity_CreateClientTlsPolicy_async", + "title": "NetworkSecurity createClientTlsPolicy Sample", + "origin": "API_DEFINITION", + "description": " Creates a new ClientTlsPolicy in a given project and location.", + "canonical": true, + "file": "network_security.create_client_tls_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.CreateClientTlsPolicy", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "client_tls_policy_id", + "type": "TYPE_STRING" + }, + { + "name": "client_tls_policy", + "type": ".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetworkSecurityClient", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurityClient" + }, + "method": { + "shortName": "CreateClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.CreateClientTlsPolicy", + "service": { + "shortName": "NetworkSecurity", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity" + } + } + } + }, + { + "regionTag": "networksecurity_v1alpha1_generated_NetworkSecurity_UpdateClientTlsPolicy_async", + "title": "NetworkSecurity updateClientTlsPolicy Sample", + "origin": "API_DEFINITION", + "description": " Updates the parameters of a single ClientTlsPolicy.", + "canonical": true, + "file": "network_security.update_client_tls_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.UpdateClientTlsPolicy", + "async": true, + "parameters": [ + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "client_tls_policy", + "type": ".google.cloud.networksecurity.v1alpha1.ClientTlsPolicy" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetworkSecurityClient", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurityClient" + }, + "method": { + "shortName": "UpdateClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.UpdateClientTlsPolicy", + "service": { + "shortName": "NetworkSecurity", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity" + } + } + } + }, + { + "regionTag": "networksecurity_v1alpha1_generated_NetworkSecurity_DeleteClientTlsPolicy_async", + "title": "NetworkSecurity deleteClientTlsPolicy Sample", + "origin": "API_DEFINITION", + "description": " Deletes a single ClientTlsPolicy.", + "canonical": true, + "file": "network_security.delete_client_tls_policy.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.DeleteClientTlsPolicy", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "NetworkSecurityClient", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurityClient" + }, + "method": { + "shortName": "DeleteClientTlsPolicy", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity.DeleteClientTlsPolicy", + "service": { + "shortName": "NetworkSecurity", + "fullName": "google.cloud.networksecurity.v1alpha1.NetworkSecurity" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json index 4d010b6f97ca..93727dcb324a 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata.google.cloud.networksecurity.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json index 4d010b6f97ca..93727dcb324a 100644 --- a/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json +++ b/packages/google-cloud-networksecurity/samples/generated/v1beta1/snippet_metadata_google.cloud.networksecurity.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-networksecurity", - "version": "3.2.0", + "version": "3.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-networksecurity/samples/package.json b/packages/google-cloud-networksecurity/samples/package.json index 451195420549..59855dbd719c 100644 --- a/packages/google-cloud-networksecurity/samples/package.json +++ b/packages/google-cloud-networksecurity/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/network-security": "^3.2.0" + "@google-cloud/network-security": "^3.3.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-networksecurity/src/index.ts b/packages/google-cloud-networksecurity/src/index.ts index d475bdde0550..efd0bb54929b 100644 --- a/packages/google-cloud-networksecurity/src/index.ts +++ b/packages/google-cloud-networksecurity/src/index.ts @@ -17,12 +17,13 @@ // ** All changes to this file may be overwritten. ** import * as v1 from './v1'; +import * as v1alpha1 from './v1alpha1'; import * as v1beta1 from './v1beta1'; const NetworkSecurityClient = v1beta1.NetworkSecurityClient; type NetworkSecurityClient = v1beta1.NetworkSecurityClient; -export {v1, v1beta1, NetworkSecurityClient}; -export default {v1, v1beta1, NetworkSecurityClient}; +export {v1, v1alpha1, v1beta1, NetworkSecurityClient}; +export default {v1, v1alpha1, v1beta1, NetworkSecurityClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-networksecurity/src/v1alpha1/gapic_metadata.json b/packages/google-cloud-networksecurity/src/v1alpha1/gapic_metadata.json new file mode 100644 index 000000000000..dd986ae53920 --- /dev/null +++ b/packages/google-cloud-networksecurity/src/v1alpha1/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.cloud.networksecurity.v1alpha1", + "libraryPackage": "@google-cloud/networksecurity", + "services": { + "NetworkSecurity": { + "clients": { + "grpc": { + "libraryClient": "NetworkSecurityClient", + "rpcs": { + "GetClientTlsPolicy": { + "methods": [ + "getClientTlsPolicy" + ] + }, + "CreateClientTlsPolicy": { + "methods": [ + "createClientTlsPolicy" + ] + }, + "UpdateClientTlsPolicy": { + "methods": [ + "updateClientTlsPolicy" + ] + }, + "DeleteClientTlsPolicy": { + "methods": [ + "deleteClientTlsPolicy" + ] + }, + "ListClientTlsPolicies": { + "methods": [ + "listClientTlsPolicies", + "listClientTlsPoliciesStream", + "listClientTlsPoliciesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "NetworkSecurityClient", + "rpcs": { + "GetClientTlsPolicy": { + "methods": [ + "getClientTlsPolicy" + ] + }, + "CreateClientTlsPolicy": { + "methods": [ + "createClientTlsPolicy" + ] + }, + "UpdateClientTlsPolicy": { + "methods": [ + "updateClientTlsPolicy" + ] + }, + "DeleteClientTlsPolicy": { + "methods": [ + "deleteClientTlsPolicy" + ] + }, + "ListClientTlsPolicies": { + "methods": [ + "listClientTlsPolicies", + "listClientTlsPoliciesStream", + "listClientTlsPoliciesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-networksecurity/src/v1alpha1/index.ts b/packages/google-cloud-networksecurity/src/v1alpha1/index.ts new file mode 100644 index 000000000000..1848d33bf233 --- /dev/null +++ b/packages/google-cloud-networksecurity/src/v1alpha1/index.ts @@ -0,0 +1,19 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export {NetworkSecurityClient} from './network_security_client'; diff --git a/packages/google-cloud-networksecurity/src/v1alpha1/network_security_client.ts b/packages/google-cloud-networksecurity/src/v1alpha1/network_security_client.ts new file mode 100644 index 000000000000..ef6f5cb7def4 --- /dev/null +++ b/packages/google-cloud-networksecurity/src/v1alpha1/network_security_client.ts @@ -0,0 +1,1548 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, GrpcClientOptions, LROperation, PaginationCallback, GaxCall, IamClient, IamProtos, LocationsClient, LocationProtos} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import {loggingUtils as logging, decodeAnyProtosInArray} from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v1alpha1/network_security_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './network_security_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Network Security API provides resources to configure authentication and + * authorization policies. Refer to per API resource documentation for more + * information. + * @class + * @memberof v1alpha1 + */ +export class NetworkSecurityClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: {[method: string]: gax.CallSettings}; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('networksecurity'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + networkSecurityStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of NetworkSecurityClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new NetworkSecurityClient({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 NetworkSecurityClient; + 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 = 'networksecurity.' + 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; + } + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); + + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); + + + // 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 = { + clientTlsPolicyPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/clientTlsPolicies/{client_tls_policy}' + ), + }; + + // 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 = { + listClientTlsPolicies: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'clientTlsPolicies') + }; + + const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined + }; + if (opts.fallback) { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [{selector: 'google.cloud.location.Locations.GetLocation',get: '/v1alpha1/{name=projects/*/locations/*}',},{selector: 'google.cloud.location.Locations.ListLocations',get: '/v1alpha1/{name=projects/*}/locations',},{selector: 'google.iam.v1.IAMPolicy.GetIamPolicy',get: '/v1alpha1/{resource=projects/*/locations/*/authorizationPolicies/*}:getIamPolicy',additional_bindings: [{get: '/v1alpha1/{resource=projects/*/locations/*/serverTlsPolicies/*}:getIamPolicy',},{get: '/v1alpha1/{resource=projects/*/locations/*/clientTlsPolicies/*}:getIamPolicy',},{get: '/v1alpha1/{resource=projects/*/locations/*/addressGroups/*}:getIamPolicy',},{get: '/v1alpha1/{resource=projects/*/locations/*/authzPolicies/*}:getIamPolicy',}], + },{selector: 'google.iam.v1.IAMPolicy.SetIamPolicy',post: '/v1alpha1/{resource=projects/*/locations/*/authorizationPolicies/*}:setIamPolicy',body: '*',additional_bindings: [{post: '/v1alpha1/{resource=projects/*/locations/*/serverTlsPolicies/*}:setIamPolicy',body: '*',},{post: '/v1alpha1/{resource=projects/*/locations/*/clientTlsPolicies/*}:setIamPolicy',body: '*',},{post: '/v1alpha1/{resource=projects/*/locations/*/addressGroups/*}:setIamPolicy',body: '*',},{post: '/v1alpha1/{resource=projects/*/locations/*/authzPolicies/*}:setIamPolicy',body: '*',}], + },{selector: 'google.iam.v1.IAMPolicy.TestIamPermissions',post: '/v1alpha1/{resource=projects/*/locations/*/authorizationPolicies/*}:testIamPermissions',body: '*',additional_bindings: [{post: '/v1alpha1/{resource=projects/*/locations/*/serverTlsPolicies/*}:testIamPermissions',body: '*',},{post: '/v1alpha1/{resource=projects/*/locations/*/clientTlsPolicies/*}:testIamPermissions',body: '*',},{post: '/v1alpha1/{resource=projects/*/locations/*/addressGroups/*}:testIamPermissions',body: '*',},{post: '/v1alpha1/{resource=projects/*/locations/*/authzPolicies/*}:testIamPermissions',body: '*',}], + },{selector: 'google.longrunning.Operations.CancelOperation',post: '/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel',body: '*',additional_bindings: [{post: '/v1alpha1/{name=organizations/*/locations/*/operations/*}:cancel',body: '*',}], + },{selector: 'google.longrunning.Operations.DeleteOperation',delete: '/v1alpha1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{delete: '/v1alpha1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.GetOperation',get: '/v1alpha1/{name=projects/*/locations/*/operations/*}',additional_bindings: [{get: '/v1alpha1/{name=organizations/*/locations/*/operations/*}',}], + },{selector: 'google.longrunning.Operations.ListOperations',get: '/v1alpha1/{name=projects/*/locations/*}/operations',additional_bindings: [{get: '/v1alpha1/{name=organizations/*/locations/*}/operations',}], + }]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createClientTlsPolicyResponse = protoFilesRoot.lookup( + '.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy') as gax.protobuf.Type; + const createClientTlsPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.networksecurity.v1alpha1.OperationMetadata') as gax.protobuf.Type; + const updateClientTlsPolicyResponse = protoFilesRoot.lookup( + '.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy') as gax.protobuf.Type; + const updateClientTlsPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.networksecurity.v1alpha1.OperationMetadata') as gax.protobuf.Type; + const deleteClientTlsPolicyResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteClientTlsPolicyMetadata = protoFilesRoot.lookup( + '.google.cloud.networksecurity.v1alpha1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createClientTlsPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createClientTlsPolicyResponse.decode.bind(createClientTlsPolicyResponse), + createClientTlsPolicyMetadata.decode.bind(createClientTlsPolicyMetadata)), + updateClientTlsPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateClientTlsPolicyResponse.decode.bind(updateClientTlsPolicyResponse), + updateClientTlsPolicyMetadata.decode.bind(updateClientTlsPolicyMetadata)), + deleteClientTlsPolicy: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteClientTlsPolicyResponse.decode.bind(deleteClientTlsPolicyResponse), + deleteClientTlsPolicyMetadata.decode.bind(deleteClientTlsPolicyMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.networksecurity.v1alpha1.NetworkSecurity', 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.networkSecurityStub) { + return this.networkSecurityStub; + } + + // Put together the "service stub" for + // google.cloud.networksecurity.v1alpha1.NetworkSecurity. + this.networkSecurityStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.networksecurity.v1alpha1.NetworkSecurity') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.networksecurity.v1alpha1.NetworkSecurity, + 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 networkSecurityStubMethods = + ['listClientTlsPolicies', 'getClientTlsPolicy', 'createClientTlsPolicy', 'updateClientTlsPolicy', 'deleteClientTlsPolicy']; + for (const methodName of networkSecurityStubMethods) { + const callPromise = this.networkSecurityStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.networkSecurityStub; + } + + /** + * 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 'networksecurity.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 'networksecurity.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 details of a single ClientTlsPolicy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. A name of the ClientTlsPolicy to get. Must be in the format + * `projects/* /locations/{location}/clientTlsPolicies/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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.networksecurity.v1alpha1.ClientTlsPolicy|ClientTlsPolicy}. + * 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/v1alpha1/network_security.get_client_tls_policy.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_GetClientTlsPolicy_async + */ + getClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|undefined, {}|undefined + ]>; + getClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|null|undefined, + {}|null|undefined>): void; + getClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest, + callback: Callback< + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|null|undefined, + {}|null|undefined>): void; + getClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('getClientTlsPolicy request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getClientTlsPolicy response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getClientTlsPolicy(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy, + protos.google.cloud.networksecurity.v1alpha1.IGetClientTlsPolicyRequest|undefined, + {}|undefined + ]) => { + this._log.info('getClientTlsPolicy response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } + +/** + * Creates a new ClientTlsPolicy in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource of the ClientTlsPolicy. Must be in + * the format `projects/* /locations/{location}`. + * @param {string} request.clientTlsPolicyId + * Required. Short name of the ClientTlsPolicy resource to be created. This + * value should be 1-63 characters long, containing only letters, numbers, + * hyphens, and underscores, and should not start with a number. E.g. + * "client_mtls_policy". + * @param {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} request.clientTlsPolicy + * Required. ClientTlsPolicy resource to be created. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/v1alpha1/network_security.create_client_tls_policy.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_CreateClientTlsPolicy_async + */ + createClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.ICreateClientTlsPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createClientTlsPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createClientTlsPolicy request %j', request); + return this.innerApiCalls.createClientTlsPolicy(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createClientTlsPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createClientTlsPolicy()`. + * @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/v1alpha1/network_security.create_client_tls_policy.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_CreateClientTlsPolicy_async + */ + async checkCreateClientTlsPolicyProgress(name: string): Promise>{ + this._log.info('createClientTlsPolicy long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createClientTlsPolicy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates the parameters of a single ClientTlsPolicy. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Field mask is used to specify the fields to be overwritten in the + * ClientTlsPolicy resource by the update. The fields + * specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the + * mask. If the user does not provide a mask then all fields will be + * overwritten. + * @param {google.cloud.networksecurity.v1alpha1.ClientTlsPolicy} request.clientTlsPolicy + * Required. Updated ClientTlsPolicy resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/v1alpha1/network_security.update_client_tls_policy.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_UpdateClientTlsPolicy_async + */ + updateClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.IUpdateClientTlsPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'client_tls_policy.name': request.clientTlsPolicy!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateClientTlsPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateClientTlsPolicy request %j', request); + return this.innerApiCalls.updateClientTlsPolicy(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateClientTlsPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateClientTlsPolicy()`. + * @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/v1alpha1/network_security.update_client_tls_policy.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_UpdateClientTlsPolicy_async + */ + async checkUpdateClientTlsPolicyProgress(name: string): Promise>{ + this._log.info('updateClientTlsPolicy long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateClientTlsPolicy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a single ClientTlsPolicy. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. A name of the ClientTlsPolicy to delete. Must be in + * the format `projects/* /locations/{location}/clientTlsPolicies/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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/v1alpha1/network_security.delete_client_tls_policy.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_DeleteClientTlsPolicy_async + */ + deleteClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteClientTlsPolicy( + request: protos.google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteClientTlsPolicy( + request?: protos.google.cloud.networksecurity.v1alpha1.IDeleteClientTlsPolicyRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteClientTlsPolicy response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteClientTlsPolicy request %j', request); + return this.innerApiCalls.deleteClientTlsPolicy(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteClientTlsPolicy response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteClientTlsPolicy()`. + * @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/v1alpha1/network_security.delete_client_tls_policy.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_DeleteClientTlsPolicy_async + */ + async checkDeleteClientTlsPolicyProgress(name: string): Promise>{ + this._log.info('deleteClientTlsPolicy long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteClientTlsPolicy, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists ClientTlsPolicies in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/* /locations/{location}`. + * @param {number} request.pageSize + * Maximum number of ClientTlsPolicies to return per call. + * @param {string} request.pageToken + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/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.networksecurity.v1alpha1.ClientTlsPolicy|ClientTlsPolicy}. + * 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 `listClientTlsPoliciesAsync()` + * 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. + */ + listClientTlsPolicies( + request?: protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[], + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest|null, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse + ]>; + listClientTlsPolicies( + request: protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse|null|undefined, + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy>): void; + listClientTlsPolicies( + request: protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + callback: PaginationCallback< + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse|null|undefined, + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy>): void; + listClientTlsPolicies( + request?: protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse|null|undefined, + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy>, + callback?: PaginationCallback< + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse|null|undefined, + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy>): + Promise<[ + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[], + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest|null, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse|null|undefined, + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listClientTlsPolicies values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listClientTlsPolicies request %j', request); + return this.innerApiCalls + .listClientTlsPolicies(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[], + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest|null, + protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesResponse + ]) => { + this._log.info('listClientTlsPolicies values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listClientTlsPolicies`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/* /locations/{location}`. + * @param {number} request.pageSize + * Maximum number of ClientTlsPolicies to return per call. + * @param {string} request.pageToken + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * @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.networksecurity.v1alpha1.ClientTlsPolicy|ClientTlsPolicy} 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 `listClientTlsPoliciesAsync()` + * 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. + */ + listClientTlsPoliciesStream( + request?: protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + 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['listClientTlsPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listClientTlsPolicies stream %j', request); + return this.descriptors.page.listClientTlsPolicies.createStream( + this.innerApiCalls.listClientTlsPolicies as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listClientTlsPolicies`, 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 project and location from which the ClientTlsPolicies should + * be listed, specified in the format `projects/* /locations/{location}`. + * @param {number} request.pageSize + * Maximum number of ClientTlsPolicies to return per call. + * @param {string} request.pageToken + * The value returned by the last `ListClientTlsPoliciesResponse` + * Indicates that this is a continuation of a prior + * `ListClientTlsPolicies` call, and that the system + * should return the next page of data. + * @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.networksecurity.v1alpha1.ClientTlsPolicy|ClientTlsPolicy}. 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/v1alpha1/network_security.list_client_tls_policies.js + * region_tag:networksecurity_v1alpha1_generated_NetworkSecurity_ListClientTlsPolicies_async + */ + listClientTlsPoliciesAsync( + request?: protos.google.cloud.networksecurity.v1alpha1.IListClientTlsPoliciesRequest, + 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['listClientTlsPolicies']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listClientTlsPolicies iterate %j', request); + return this.descriptors.page.listClientTlsPolicies.asyncIterate( + this.innerApiCalls['listClientTlsPolicies'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as {@link google.iam.v1.GetPolicyOptions | GetPolicyOptions}. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.Policy | Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.Policy | Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.getIamPolicy(request, options, callback); + } + +/** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.Policy]> { + return this.iamClient.setIamPolicy(request, options, callback); + } + +/** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see {@link https://cloud.google.com/iam/docs/overview#permissions | IAM Overview }. + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See {@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html | gax.CallOptions} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.iam.v1.TestIamPermissionsResponse | TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ):Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]> { + return this.iamClient.testIamPermissions(request, options, callback); + } + +/** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.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 google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + +/** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list 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 google.cloud.location.Location | Location}. 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 + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + +/** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error, ?Object)=} callback + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * @return {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * {@link google.longrunning.Operation | google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * const name = ''; + * const [response] = await client.getOperation({name}); + * // doThingsWith(response) + * ``` + */ + getOperation( + request: protos.google.longrunning.GetOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.longrunning.Operation, + protos.google.longrunning.GetOperationRequest, + {} | null | undefined + > + ): Promise<[protos.google.longrunning.Operation]> { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.getOperation(request, options, callback); + } + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object. + * + * For-await-of syntax is used with the iterable to recursively get response element on-demand. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation collection. + * @param {string} request.filter - The standard list filter. + * @param {number=} request.pageSize - + * The maximum number of resources contained in the underlying API + * response. If page streaming is performed per-resource, this + * parameter does not affect the return value. If page streaming is + * performed per-page, this determines the maximum number of + * resources in a page. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @returns {Object} + * An iterable Object that conforms to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | iteration protocols}. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * for await (const response of client.listOperationsAsync(request)); + * // doThingsWith(response) + * ``` + */ + listOperationsAsync( + request: protos.google.longrunning.ListOperationsRequest, + options?: gax.CallOptions + ): AsyncIterable { + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.listOperationsAsync(request, options); + } + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * {@link Operations.GetOperation} or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an {@link Operation.error} value with a {@link google.rpc.Status.code} of + * 1, corresponding to `Code.CANCELLED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be cancelled. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} for the + * details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.cancelOperation({name: ''}); + * ``` + */ + cancelOperation( + request: protos.google.longrunning.CancelOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.cancelOperation(request, options, callback); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * @param {Object} request - The request object that will be sent. + * @param {string} request.name - The name of the operation resource to be deleted. + * @param {Object=} options + * Optional parameters. You can override the default settings for this call, + * e.g, timeout, retries, paginations, etc. See {@link + * https://googleapis.github.io/gax-nodejs/global.html#CallOptions | gax.CallOptions} + * for the details. + * @param {function(?Error)=} callback + * The function which will be called with the result of the API call. + * @return {Promise} - The promise which resolves when API call finishes. + * The promise has a method named "cancel" which cancels the ongoing API + * call. + * + * @example + * ``` + * const client = longrunning.operationsClient(); + * await client.deleteOperation({name: ''}); + * ``` + */ + deleteOperation( + request: protos.google.longrunning.DeleteOperationRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.DeleteOperationRequest, + {} | null | undefined + > + ): Promise { + let options: gax.CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as gax.CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified clientTlsPolicy resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} client_tls_policy + * @returns {string} Resource name string. + */ + clientTlsPolicyPath(project:string,location:string,clientTlsPolicy:string) { + return this.pathTemplates.clientTlsPolicyPathTemplate.render({ + project: project, + location: location, + client_tls_policy: clientTlsPolicy, + }); + } + + /** + * Parse the project from ClientTlsPolicy resource. + * + * @param {string} clientTlsPolicyName + * A fully-qualified path representing ClientTlsPolicy resource. + * @returns {string} A string representing the project. + */ + matchProjectFromClientTlsPolicyName(clientTlsPolicyName: string) { + return this.pathTemplates.clientTlsPolicyPathTemplate.match(clientTlsPolicyName).project; + } + + /** + * Parse the location from ClientTlsPolicy resource. + * + * @param {string} clientTlsPolicyName + * A fully-qualified path representing ClientTlsPolicy resource. + * @returns {string} A string representing the location. + */ + matchLocationFromClientTlsPolicyName(clientTlsPolicyName: string) { + return this.pathTemplates.clientTlsPolicyPathTemplate.match(clientTlsPolicyName).location; + } + + /** + * Parse the client_tls_policy from ClientTlsPolicy resource. + * + * @param {string} clientTlsPolicyName + * A fully-qualified path representing ClientTlsPolicy resource. + * @returns {string} A string representing the client_tls_policy. + */ + matchClientTlsPolicyFromClientTlsPolicyName(clientTlsPolicyName: string) { + return this.pathTemplates.clientTlsPolicyPathTemplate.match(clientTlsPolicyName).client_tls_policy; + } + + /** + * 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.networkSecurityStub && !this._terminated) { + return this.networkSecurityStub.then(stub => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.iamClient.close().catch(err => {throw err}); + this.locationsClient.close().catch(err => {throw err}); + void this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} \ No newline at end of file diff --git a/packages/google-cloud-networksecurity/src/v1alpha1/network_security_client_config.json b/packages/google-cloud-networksecurity/src/v1alpha1/network_security_client_config.json new file mode 100644 index 000000000000..dce64bde33d6 --- /dev/null +++ b/packages/google-cloud-networksecurity/src/v1alpha1/network_security_client_config.json @@ -0,0 +1,51 @@ +{ + "interfaces": { + "google.cloud.networksecurity.v1alpha1.NetworkSecurity": { + "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": { + "ListClientTlsPolicies": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteClientTlsPolicy": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-networksecurity/src/v1alpha1/network_security_proto_list.json b/packages/google-cloud-networksecurity/src/v1alpha1/network_security_proto_list.json new file mode 100644 index 000000000000..586e2473331d --- /dev/null +++ b/packages/google-cloud-networksecurity/src/v1alpha1/network_security_proto_list.json @@ -0,0 +1,6 @@ +[ + "../../protos/google/cloud/networksecurity/v1alpha1/client_tls_policy.proto", + "../../protos/google/cloud/networksecurity/v1alpha1/common.proto", + "../../protos/google/cloud/networksecurity/v1alpha1/network_security.proto", + "../../protos/google/cloud/networksecurity/v1alpha1/tls.proto" +] diff --git a/packages/google-cloud-networksecurity/test/gapic_network_security_v1alpha1.ts b/packages/google-cloud-networksecurity/test/gapic_network_security_v1alpha1.ts new file mode 100644 index 000000000000..3766b3774124 --- /dev/null +++ b/packages/google-cloud-networksecurity/test/gapic_network_security_v1alpha1.ts @@ -0,0 +1,1842 @@ +// Copyright 2025 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 networksecurityModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos, IamProtos, LocationProtos} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubLongRunningCall(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().rejects(callError) : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback(response?: ResponseType, callError?: Error, lroError?: Error) { + const innerStub = lroError ? sinon.stub().rejects(lroError) : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError ? sinon.stub().callsArgWith(2, callError) : sinon.stub().callsArgWith(2, null, mockOperation); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha1.NetworkSecurityClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networksecurity.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient(); + 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 = networksecurityModule.v1alpha1.NetworkSecurityClient.servicePath; + assert.strictEqual(servicePath, 'networksecurity.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = networksecurityModule.v1alpha1.NetworkSecurityClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'networksecurity.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networksecurity.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networksecurity.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 networksecurityModule.v1alpha1.NetworkSecurityClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networksecurity.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 networksecurityModule.v1alpha1.NetworkSecurityClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'networksecurity.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 networksecurityModule.v1alpha1.NetworkSecurityClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = networksecurityModule.v1alpha1.NetworkSecurityClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.networkSecurityStub, undefined); + await client.initialize(); + assert(client.networkSecurityStub); + }); + + it('has close method for the initialized client', done => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize().catch(err => {throw err}); + assert(client.networkSecurityStub); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has close method for the non-initialized client', done => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.networkSecurityStub, undefined); + client.close().then(() => { + done(); + }).catch(err => {throw err}); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + 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 networksecurityModule.v1alpha1.NetworkSecurityClient({ + 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('getClientTlsPolicy', () => { + it('invokes getClientTlsPolicy without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy() + ); + client.innerApiCalls.getClientTlsPolicy = stubSimpleCall(expectedResponse); + const [response] = await client.getClientTlsPolicy(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getClientTlsPolicy without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy() + ); + client.innerApiCalls.getClientTlsPolicy = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getClientTlsPolicy( + request, + (err?: Error|null, result?: protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getClientTlsPolicy with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.getClientTlsPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getClientTlsPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.getClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getClientTlsPolicy with closed client', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.GetClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getClientTlsPolicy(request), expectedError); + }); + }); + + describe('createClientTlsPolicy', () => { + it('invokes createClientTlsPolicy without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createClientTlsPolicy = stubLongRunningCall(expectedResponse); + const [operation] = await client.createClientTlsPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createClientTlsPolicy without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createClientTlsPolicy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createClientTlsPolicy( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createClientTlsPolicy with call error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createClientTlsPolicy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createClientTlsPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createClientTlsPolicy with LRO error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.CreateClientTlsPolicyRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createClientTlsPolicy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createClientTlsPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateClientTlsPolicyProgress without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateClientTlsPolicyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateClientTlsPolicyProgress with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateClientTlsPolicyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateClientTlsPolicy', () => { + it('invokes updateClientTlsPolicy without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest() + ); + request.clientTlsPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest', ['clientTlsPolicy', 'name']); + request.clientTlsPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `client_tls_policy.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateClientTlsPolicy = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateClientTlsPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateClientTlsPolicy without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest() + ); + request.clientTlsPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest', ['clientTlsPolicy', 'name']); + request.clientTlsPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `client_tls_policy.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateClientTlsPolicy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateClientTlsPolicy( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateClientTlsPolicy with call error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest() + ); + request.clientTlsPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest', ['clientTlsPolicy', 'name']); + request.clientTlsPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `client_tls_policy.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateClientTlsPolicy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateClientTlsPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateClientTlsPolicy with LRO error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest() + ); + request.clientTlsPolicy ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.UpdateClientTlsPolicyRequest', ['clientTlsPolicy', 'name']); + request.clientTlsPolicy.name = defaultValue1; + const expectedHeaderRequestParams = `client_tls_policy.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateClientTlsPolicy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateClientTlsPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateClientTlsPolicyProgress without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateClientTlsPolicyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateClientTlsPolicyProgress with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateClientTlsPolicyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteClientTlsPolicy', () => { + it('invokes deleteClientTlsPolicy without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteClientTlsPolicy = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteClientTlsPolicy(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteClientTlsPolicy without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteClientTlsPolicy = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteClientTlsPolicy( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteClientTlsPolicy with call error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteClientTlsPolicy = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteClientTlsPolicy(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteClientTlsPolicy with LRO error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.DeleteClientTlsPolicyRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteClientTlsPolicy = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteClientTlsPolicy(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteClientTlsPolicy as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteClientTlsPolicyProgress without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteClientTlsPolicyProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteClientTlsPolicyProgress with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteClientTlsPolicyProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listClientTlsPolicies', () => { + it('invokes listClientTlsPolicies without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + ]; + client.innerApiCalls.listClientTlsPolicies = stubSimpleCall(expectedResponse); + const [response] = await client.listClientTlsPolicies(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listClientTlsPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClientTlsPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClientTlsPolicies without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + ]; + client.innerApiCalls.listClientTlsPolicies = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listClientTlsPolicies( + request, + (err?: Error|null, result?: protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listClientTlsPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClientTlsPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClientTlsPolicies with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listClientTlsPolicies = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listClientTlsPolicies(request), expectedError); + const actualRequest = (client.innerApiCalls.listClientTlsPolicies as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listClientTlsPolicies as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listClientTlsPoliciesStream without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + ]; + client.descriptors.page.listClientTlsPolicies.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listClientTlsPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy[] = []; + stream.on('data', (response: protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy) => { + 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.listClientTlsPolicies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listClientTlsPolicies, request)); + assert( + (client.descriptors.page.listClientTlsPolicies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listClientTlsPoliciesStream with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listClientTlsPolicies.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listClientTlsPoliciesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy[] = []; + stream.on('data', (response: protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listClientTlsPolicies.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listClientTlsPolicies, request)); + assert( + (client.descriptors.page.listClientTlsPolicies.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listClientTlsPolicies without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + generateSampleMessage(new protos.google.cloud.networksecurity.v1alpha1.ClientTlsPolicy()), + ]; + client.descriptors.page.listClientTlsPolicies.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[] = []; + const iterable = client.listClientTlsPoliciesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listClientTlsPolicies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listClientTlsPolicies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listClientTlsPolicies with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.networksecurity.v1alpha1.ListClientTlsPoliciesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listClientTlsPolicies.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listClientTlsPoliciesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.networksecurity.v1alpha1.IClientTlsPolicy[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listClientTlsPolicies.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listClientTlsPolicies.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getIamPolicy(request, expectedOptions), expectedError); + assert((client.iamClient.getIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.Policy|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.setIamPolicy(request, expectedOptions), expectedError); + assert((client.iamClient.setIamPolicy as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + (err?: Error|null, result?: IamProtos.google.iam.v1.TestIamPermissionsResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.testIamPermissions(request, expectedOptions), expectedError); + assert((client.iamClient.testIamPermissions as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + it('invokes getLocation without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getLocation(request, expectedOptions), expectedError); + assert((client.locationsClient.getLocation as SinonStub) + .getCall(0).calledWith(request, expectedOptions, undefined)); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.locationsClient.descriptors.page.listLocations.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + describe('getOperation', () => { + it('invokes getOperation without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const response = await client.getOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes getOperation without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + client.operationsClient.getOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.getOperation( + request, + undefined, + ( + err?: Error | null, + result?: operationsProtos.google.longrunning.Operation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + it('invokes getOperation with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.GetOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.getOperation(request)}, expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('cancelOperation', () => { + it('invokes cancelOperation without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = stubSimpleCall(expectedResponse); + const response = await client.cancelOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes cancelOperation without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.cancelOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.cancelOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0)); + }); + it('invokes cancelOperation with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.CancelOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.cancelOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.cancelOperation(request)}, expectedError); + assert((client.operationsClient.cancelOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('deleteOperation', () => { + it('invokes deleteOperation without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = stubSimpleCall(expectedResponse); + const response = await client.deleteOperation(request); + assert.deepStrictEqual(response, [expectedResponse]); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request) + ); + }); + it('invokes deleteOperation without error using callback', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.operationsClient.deleteOperation = sinon.stub().callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.operationsClient.deleteOperation( + request, + undefined, + ( + err?: Error | null, + result?: protos.google.protobuf.Empty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }).catch(err => {throw err}); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0)); + }); + it('invokes deleteOperation with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.DeleteOperationRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.deleteOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(async () => {await client.deleteOperation(request)}, expectedError); + assert((client.operationsClient.deleteOperation as SinonStub) + .getCall(0).calledWith(request)); + }); + }); + describe('listOperationsAsync', () => { + it('uses async iteration with listOperations without error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsResponse() + ), + ]; + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: operationsProtos.google.longrunning.IOperation[] = []; + const iterable = client.operationsClient.listOperationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + it('uses async iteration with listOperations with error', async () => { + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new operationsProtos.google.longrunning.ListOperationsRequest() + ); + const expectedError = new Error('expected'); + client.operationsClient.descriptor.listOperations.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.operationsClient.listOperationsAsync(request); + await assert.rejects(async () => { + const responses: operationsProtos.google.longrunning.IOperation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.operationsClient.descriptor.listOperations.asyncIterate as SinonStub) + .getCall(0).args[1], request); + }); + }); + + describe('Path templates', () => { + + describe('clientTlsPolicy', async () => { + const fakePath = "/rendered/path/clientTlsPolicy"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + client_tls_policy: "clientTlsPolicyValue", + }; + const client = new networksecurityModule.v1alpha1.NetworkSecurityClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.clientTlsPolicyPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.clientTlsPolicyPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('clientTlsPolicyPath', () => { + const result = client.clientTlsPolicyPath("projectValue", "locationValue", "clientTlsPolicyValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.clientTlsPolicyPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromClientTlsPolicyName', () => { + const result = client.matchProjectFromClientTlsPolicyName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.clientTlsPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromClientTlsPolicyName', () => { + const result = client.matchLocationFromClientTlsPolicyName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.clientTlsPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchClientTlsPolicyFromClientTlsPolicyName', () => { + const result = client.matchClientTlsPolicyFromClientTlsPolicyName(fakePath); + assert.strictEqual(result, "clientTlsPolicyValue"); + assert((client.pathTemplates.clientTlsPolicyPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/packages/google-cloud-vision/CHANGELOG.md b/packages/google-cloud-vision/CHANGELOG.md index 056d2ba8d5bc..0d030b31aa27 100644 --- a/packages/google-cloud-vision/CHANGELOG.md +++ b/packages/google-cloud-vision/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/nodejs-vision?activeTab=versions +## [5.3.1](https://github.com/googleapis/google-cloud-node/compare/vision-v5.3.0...vision-v5.3.1) (2025-07-17) + + +### Bug Fixes + +* **deps:** Update dependency redis to ~5.6.0 ([#6469](https://github.com/googleapis/google-cloud-node/issues/6469)) ([6ac1df8](https://github.com/googleapis/google-cloud-node/commit/6ac1df8ff2e813499c8f4f2248ed3b8b16193446)) + ## [5.3.0](https://github.com/googleapis/google-cloud-node/compare/vision-v5.2.0...vision-v5.3.0) (2025-07-09) diff --git a/packages/google-cloud-vision/package.json b/packages/google-cloud-vision/package.json index d70ae098e5a9..5ea70358eaf9 100644 --- a/packages/google-cloud-vision/package.json +++ b/packages/google-cloud-vision/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/vision", "description": "Google Cloud Vision API client for Node.js", - "version": "5.3.0", + "version": "5.3.1", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-vision/protos/protos.d.ts b/packages/google-cloud-vision/protos/protos.d.ts index 0eda115acccd..a3430434555d 100644 --- a/packages/google-cloud-vision/protos/protos.d.ts +++ b/packages/google-cloud-vision/protos/protos.d.ts @@ -43142,6 +43142,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -43159,6 +43162,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -43859,6 +43865,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -43873,6 +43882,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -43951,6 +43963,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -44277,6 +44401,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -44291,6 +44418,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -44615,6 +44745,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -44996,6 +45229,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -45026,6 +45260,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -45075,6 +45312,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -45209,6 +45449,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -45250,6 +45493,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -46097,6 +46343,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -46123,6 +46372,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -47057,6 +47309,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -47112,6 +47367,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -47332,6 +47590,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -47570,6 +47943,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -47592,6 +47968,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -48184,6 +48563,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -48213,6 +48598,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -48335,6 +48726,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -48454,8 +48955,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -48470,8 +48974,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -49004,6 +49511,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Duration. */ interface IDuration { diff --git a/packages/google-cloud-vision/protos/protos.js b/packages/google-cloud-vision/protos/protos.js index e29d5832b302..b49837ac9a23 100644 --- a/packages/google-cloud-vision/protos/protos.js +++ b/packages/google-cloud-vision/protos/protos.js @@ -108650,6 +108650,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -108684,6 +108685,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -108716,6 +108725,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -108767,6 +108778,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -108818,6 +108833,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -108860,6 +108880,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -108878,8 +108903,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -108887,6 +108914,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -110709,6 +110738,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -110734,6 +110764,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -110760,6 +110798,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -110800,6 +110840,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -110840,6 +110884,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -110860,6 +110909,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -110876,10 +110930,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -110909,6 +110967,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -111785,6 +112095,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -111796,6 +112107,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -111810,6 +112122,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -111836,6 +112156,9 @@ 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(); return writer; }; @@ -111866,7 +112189,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -111876,6 +112199,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -111916,6 +112262,14 @@ 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"; + } return null; }; @@ -111936,6 +112290,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -111952,10 +112313,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -112594,30 +112963,275 @@ 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; + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + + /** + * 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; })(); /** @@ -113579,6 +114193,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -113593,6 +114208,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -113617,6 +114233,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -113639,6 +114256,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -113689,6 +114307,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -113810,6 +114436,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -113882,6 +114511,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -113984,6 +114619,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -114038,6 +114680,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -114090,6 +114733,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -114153,6 +114803,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -114218,6 +114872,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -114274,6 +114929,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -114322,6 +114982,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -114427,6 +115088,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -114479,6 +115148,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -114571,6 +115242,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -114684,6 +115359,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -114783,6 +115467,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -114812,6 +115516,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -114857,6 +115562,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -116901,6 +117608,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -116961,6 +117669,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -116998,6 +117714,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -117060,6 +117778,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -117128,6 +117850,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -117177,6 +117908,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -117201,6 +117952,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -117221,6 +117973,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -119539,6 +120293,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -119659,6 +120414,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -119733,6 +120496,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -119834,6 +120599,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -119969,6 +120738,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -120157,6 +120931,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -120254,6 +121033,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -120286,6 +121066,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -120558,6 +121340,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -120599,103 +121382,589 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; break; case "EDITION_PROTO3": case 999: - message.edition = 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; + })(); + + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; break; case "EDITION_2023": case 1000: - message.edition = 1000; + message.editionRemoved = 1000; break; case "EDITION_2024": case 1001: - message.edition = 1001; + message.editionRemoved = 1001; break; case "EDITION_1_TEST_ONLY": case 1: - message.edition = 1; + message.editionRemoved = 1; break; case "EDITION_2_TEST_ONLY": case 2: - message.edition = 2; + message.editionRemoved = 2; break; case "EDITION_99997_TEST_ONLY": case 99997: - message.edition = 99997; + message.editionRemoved = 99997; break; case "EDITION_99998_TEST_ONLY": case 99998: - message.edition = 99998; + message.editionRemoved = 99998; break; case "EDITION_99999_TEST_ONLY": case 99999: - message.edition = 99999; + message.editionRemoved = 99999; break; case "EDITION_MAX": case 2147483647: - message.edition = 2147483647; + message.editionRemoved = 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. + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EditionDefault.toObject = function toObject(message, options) { + FeatureSupport.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; + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; return object; }; /** - * Converts this EditionDefault to JSON. + * Converts this FeatureSupport to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @instance * @returns {Object.} JSON object */ - EditionDefault.prototype.toJSON = function toJSON() { + FeatureSupport.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for EditionDefault + * Gets the default type url for FeatureSupport * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault + * @memberof google.protobuf.FieldOptions.FeatureSupport * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; }; - return EditionDefault; + return FeatureSupport; })(); return FieldOptions; @@ -121290,6 +122559,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -121333,6 +122603,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -121371,6 +122649,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -121422,6 +122702,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -121474,6 +122758,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -121507,6 +122796,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -121539,6 +122833,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -121546,6 +122841,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -123013,6 +124310,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -123078,6 +124377,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -123114,6 +124429,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -123174,6 +124493,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -123264,6 +124591,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -123403,6 +124750,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -123426,6 +124821,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -123439,6 +124836,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -123566,6 +124967,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -123750,6 +125364,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -123767,6 +125382,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -123815,6 +125431,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -123867,6 +125487,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -123975,7 +125599,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -124002,12 +125627,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -124033,10 +125666,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -124077,8 +125712,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -124121,6 +125760,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -124133,10 +125773,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -124164,6 +125809,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -124205,10 +125854,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -124227,13 +125881,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -125448,6 +127105,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Duration = (function() { /** diff --git a/packages/google-cloud-vision/protos/protos.json b/packages/google-cloud-vision/protos/protos.json index 99c14ca6ea65..15f739e04e1e 100644 --- a/packages/google-cloud-vision/protos/protos.json +++ b/packages/google-cloud-vision/protos/protos.json @@ -8705,8 +8705,7 @@ "java_multiple_files": true, "java_outer_classname": "ResourceProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "http": { @@ -8830,6 +8829,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -8970,6 +8973,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -9027,6 +9052,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -9088,6 +9118,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -9220,12 +9263,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -9264,6 +9314,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -9352,6 +9407,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -9577,6 +9636,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -9791,6 +9854,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -9926,7 +9990,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -9954,6 +10019,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -10023,6 +10092,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -10111,6 +10200,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -10253,6 +10346,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -10263,6 +10357,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -10273,6 +10368,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -10283,6 +10379,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -10293,7 +10390,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -10303,27 +10401,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -10368,7 +10477,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -10383,6 +10498,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -10410,11 +10552,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -10427,6 +10584,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -10512,6 +10675,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Duration": { "fields": { "seconds": { @@ -10642,6 +10813,7 @@ "java_multiple_files": true, "java_outer_classname": "OperationsProto", "java_package": "com.google.longrunning", + "objc_class_prefix": "GLRUN", "php_namespace": "Google\\LongRunning" }, "nested": { diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json index 769005128119..9364b53a5f0f 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json index 4b6b140a8285..a20b59a8bdc6 100644 --- a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata_google.cloud.vision.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json index 689b8212ca0e..8fc21d95dbf7 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json index 689b8212ca0e..8fc21d95dbf7 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata_google.cloud.vision.v1p1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json index faec09e22cb6..fd524f0cbdf9 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json index faec09e22cb6..fd524f0cbdf9 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata_google.cloud.vision.v1p2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json index ca92b8d32b1f..d4221904ce33 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json index ca92b8d32b1f..d4221904ce33 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata_google.cloud.vision.v1p3beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json index e40bc22d9a52..342be0f41848 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json index e40bc22d9a52..342be0f41848 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata_google.cloud.vision.v1p4beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-vision", - "version": "5.3.0", + "version": "5.3.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-vision/samples/package.json b/packages/google-cloud-vision/samples/package.json index 6aa8355c34aa..6fdb0066318f 100644 --- a/packages/google-cloud-vision/samples/package.json +++ b/packages/google-cloud-vision/samples/package.json @@ -13,10 +13,10 @@ "test": "mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/vision": "^5.3.0", + "@google-cloud/vision": "^5.3.1", "natural": "^8.0.0", "pureimage": "^0.4.0", - "redis": "~5.5.0", + "redis": "~5.6.0", "yargs": "^17.0.0" }, "devDependencies": { diff --git a/packages/google-container/CHANGELOG.md b/packages/google-container/CHANGELOG.md index ec117d92478e..45ddf06a58c8 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 +## [6.3.0](https://github.com/googleapis/google-cloud-node/compare/container-v6.2.0...container-v6.3.0) (2025-07-17) + + +### Features + +* [container] A new enum `TransparentHugepageEnabled` is added ([#6496](https://github.com/googleapis/google-cloud-node/issues/6496)) ([c46a08f](https://github.com/googleapis/google-cloud-node/commit/c46a08f885753f84cdc0bb9b609820f9be0114ad)) + ## [6.2.0](https://github.com/googleapis/google-cloud-node/compare/container-v6.1.0...container-v6.2.0) (2025-07-09) diff --git a/packages/google-container/package.json b/packages/google-container/package.json index 624b265844e5..4ad390ffd6c6 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": "6.2.0", + "version": "6.3.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { 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 fbf81363dcc9..a29904596d39 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -575,6 +575,55 @@ message LinuxNodeConfig { optional int32 hugepage_size1g = 2 [(google.api.field_behavior) = OPTIONAL]; } + // Possible values for transparent hugepage enabled support. + enum TransparentHugepageEnabled { + // Default value. GKE will not modify the kernel configuration. + TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED = 0; + + // Transparent hugepage support for anonymous memory is enabled system wide. + TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS = 1; + + // Transparent hugepage support for anonymous memory is enabled inside + // MADV_HUGEPAGE regions. This is the default kernel configuration. + TRANSPARENT_HUGEPAGE_ENABLED_MADVISE = 2; + + // Transparent hugepage support for anonymous memory is disabled. + TRANSPARENT_HUGEPAGE_ENABLED_NEVER = 3; + } + + // Possible values for transparent hugepage defrag support. + enum TransparentHugepageDefrag { + // Default value. GKE will not modify the kernel configuration. + TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED = 0; + + // It means that an application requesting THP will stall on allocation + // failure and directly reclaim pages and compact memory in an effort to + // allocate a THP immediately. + TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS = 1; + + // It means that an application will wake kswapd in the background to + // reclaim pages and wake kcompactd to compact memory so that THP is + // available in the near future. It’s the responsibility of khugepaged to + // then install the THP pages later. + TRANSPARENT_HUGEPAGE_DEFRAG_DEFER = 2; + + // It means that an application will enter direct reclaim and compaction + // like always, but only for regions that have used madvise(MADV_HUGEPAGE); + // all other regions will wake kswapd in the background to reclaim pages and + // wake kcompactd to compact memory so that THP is available in the near + // future. + TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE = 3; + + // It means that an application will enter direct reclaim like always but + // only for regions that are have used madvise(MADV_HUGEPAGE). This is the + // default kernel configuration. + TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE = 4; + + // It means that an application will never enter direct reclaim or + // compaction. + TRANSPARENT_HUGEPAGE_DEFRAG_NEVER = 5; + } + // The Linux kernel parameters to be applied to the nodes and all pods running // on the nodes. // @@ -592,6 +641,7 @@ message LinuxNodeConfig { // net.ipv4.tcp_rmem // net.ipv4.tcp_wmem // net.ipv4.tcp_tw_reuse + // net.ipv4.tcp_max_orphans // net.netfilter.nf_conntrack_max // net.netfilter.nf_conntrack_buckets // net.netfilter.nf_conntrack_tcp_timeout_close_wait @@ -601,7 +651,22 @@ message LinuxNodeConfig { // kernel.shmmni // kernel.shmmax // kernel.shmall + // fs.aio-max-nr + // fs.file-max + // fs.inotify.max_user_instances + // fs.inotify.max_user_watches + // fs.nr_open + // vm.dirty_background_ratio + // vm.dirty_expire_centisecs + // vm.dirty_ratio + // vm.dirty_writeback_centisecs // vm.max_map_count + // vm.overcommit_memory + // vm.overcommit_ratio + // vm.vfs_cache_pressure + // vm.swappiness + // vm.watermark_scale_factor + // vm.min_free_kbytes map sysctls = 1; // cgroup_mode specifies the cgroup mode to be used on the node. @@ -610,6 +675,26 @@ message LinuxNodeConfig { // Optional. Amounts for 2M and 1G hugepages optional HugepagesConfig hugepages = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Transparent hugepage support for anonymous memory can be entirely + // disabled (mostly for debugging purposes) or only enabled inside + // MADV_HUGEPAGE regions (to avoid the risk of consuming more memory + // resources) or enabled system wide. + // + // See https://docs.kernel.org/admin-guide/mm/transhuge.html + // for more details. + TransparentHugepageEnabled transparent_hugepage_enabled = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the transparent hugepage defrag configuration on the + // node. VM hugepage allocation can be managed by either limiting + // defragmentation for delayed allocation or skipping it entirely for + // immediate allocation only. + // + // See https://docs.kernel.org/admin-guide/mm/transhuge.html + // for more details. + TransparentHugepageDefrag transparent_hugepage_defrag = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Parameters that can be configured on Windows nodes. @@ -771,6 +856,49 @@ message NodeKubeletConfig { // for more details. repeated string allowed_unsafe_sysctls = 16 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. eviction_soft is a map of signal names to quantities that defines + // soft eviction thresholds. Each signal is compared to its corresponding + // threshold to determine if a pod eviction should occur. + EvictionSignals eviction_soft = 17 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. eviction_soft_grace_period is a map of signal names to quantities + // that defines grace periods for each soft eviction signal. The grace period + // is the amount of time that a pod must be under pressure before an eviction + // occurs. + EvictionGracePeriod eviction_soft_grace_period = 18 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. eviction_minimum_reclaim is a map of signal names to quantities + // that defines minimum reclaims, which describe the minimum amount of a given + // resource the kubelet will reclaim when performing a pod eviction while that + // resource is under pressure. + EvictionMinimumReclaim eviction_minimum_reclaim = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. eviction_max_pod_grace_period_seconds is the maximum allowed + // grace period (in seconds) to use when terminating pods in response to a + // soft eviction threshold being met. This value effectively caps the Pod's + // terminationGracePeriodSeconds value during soft evictions. Default: 0. + // Range: [0, 300]. + int32 eviction_max_pod_grace_period_seconds = 20 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines the maximum number of image pulls in parallel. + // The range is 2 to 5, inclusive. + // The default value is 2 or 3 depending on the disk type. + // + // See + // https://kubernetes.io/docs/concepts/containers/images/#maximum-parallel-image-pulls + // for more details. + int32 max_parallel_image_pulls = 21 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Defines whether to enable single process OOM killer. + // If true, will prevent the memory.oom.group flag from being set for + // container cgroups in cgroups v2. This causes processes in the container to + // be OOM killed individually instead of as a group. + optional bool single_process_oom_kill = 22 + [(google.api.field_behavior) = OPTIONAL]; } // TopologyManager defines the configuration options for Topology Manager @@ -825,6 +953,131 @@ message MemoryManager { string policy = 1; } +// Eviction signals are the current state of a particular resource at a specific +// point in time. The kubelet uses eviction signals to make eviction decisions +// by comparing the signals to eviction thresholds, which are the minimum amount +// of the resource that should be available on the node. +message EvictionSignals { + // Optional. Memory available (i.e. capacity - workingSet), in bytes. Defines + // the amount of "memory.available" signal in kubelet. Default is unset, if + // not specified in the kubelet config. Format: positive number + unit, e.g. + // 100Ki, 10Mi, 5Gi. Valid units are Ki, Mi, Gi. Must be >= 100Mi and <= 50% + // of the node's memory. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string memory_available = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of storage available on filesystem that kubelet uses for + // volumes, daemon logs, etc. Defines the amount of "nodefs.available" signal + // in kubelet. Default is unset, if not specified in the kubelet config. It + // takses percentage value for now. Sample format: "30%". Must be >= 10% and + // <= 50%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string nodefs_available = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of inodes available on filesystem that kubelet uses for + // volumes, daemon logs, etc. Defines the amount of "nodefs.inodesFree" signal + // in kubelet. Default is unset, if not specified in the kubelet config. Linux + // only. It takses percentage value for now. Sample format: "30%". Must be >= + // 5% and <= 50%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string nodefs_inodes_free = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of storage available on filesystem that container runtime + // uses for storing images layers. If the container filesystem and image + // filesystem are not separate, then imagefs can store both image layers and + // writeable layers. Defines the amount of "imagefs.available" signal in + // kubelet. Default is unset, if not specified in the kubelet config. It + // takses percentage value for now. Sample format: "30%". Must be >= 15% and + // <= 50%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string imagefs_available = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of inodes available on filesystem that container runtime + // uses for storing images layers. Defines the amount of "imagefs.inodesFree" + // signal in kubelet. Default is unset, if not specified in the kubelet + // config. Linux only. It takses percentage value for now. Sample format: + // "30%". Must be >= 5% and <= 50%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string imagefs_inodes_free = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Amount of PID available for pod allocation. Defines the amount of + // "pid.available" signal in kubelet. Default is unset, if not specified in + // the kubelet config. It takses percentage value for now. Sample format: + // "30%". Must be >= 10% and <= 50%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string pid_available = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Eviction grace periods are grace periods for each eviction signal. +message EvictionGracePeriod { + // Optional. Grace period for eviction due to memory available signal. Sample + // format: "10s". Must be >= 0. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string memory_available = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Grace period for eviction due to nodefs available signal. Sample + // format: "10s". Must be >= 0. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string nodefs_available = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Grace period for eviction due to nodefs inodes free signal. + // Sample format: "10s". Must be >= 0. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string nodefs_inodes_free = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Grace period for eviction due to imagefs available signal. Sample + // format: "10s". Must be >= 0. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string imagefs_available = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Grace period for eviction due to imagefs inodes free signal. + // Sample format: "10s". Must be >= 0. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string imagefs_inodes_free = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Grace period for eviction due to pid available signal. Sample + // format: "10s". Must be >= 0. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string pid_available = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Eviction minimum reclaims are the resource amounts of minimum reclaims for +// each eviction signal. +message EvictionMinimumReclaim { + // Optional. Minimum reclaim for eviction due to memory available signal. Only + // take percentage value for now. Sample format: "10%". Must be <=10%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string memory_available = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum reclaim for eviction due to nodefs available signal. Only + // take percentage value for now. Sample format: "10%". Must be <=10%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string nodefs_available = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum reclaim for eviction due to nodefs inodes free signal. + // Only take percentage value for now. Sample format: "10%". Must be <=10%. + // See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string nodefs_inodes_free = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum reclaim for eviction due to imagefs available signal. + // Only take percentage value for now. Sample format: "10%". Must be <=10%. + // See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string imagefs_available = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum reclaim for eviction due to imagefs inodes free signal. + // Only take percentage value for now. Sample format: "10%". Must be <=10%. + // See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string imagefs_inodes_free = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum reclaim for eviction due to pid available signal. Only + // take percentage value for now. Sample format: "10%". Must be <=10%. See + // https://kubernetes.io/docs/concepts/scheduling-eviction/node-pressure-eviction/#eviction-signals + string pid_available = 6 [(google.api.field_behavior) = OPTIONAL]; +} + // Parameters that describe the nodes in a cluster. // // GKE Autopilot clusters do not @@ -937,8 +1190,8 @@ message NodeConfig { // The image type to use for this node. Note that for a given image type, // the latest version of it will be used. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + // for available image types. string image_type = 5; // The map of Kubernetes labels (key/value pairs) to be applied to each node. @@ -966,13 +1219,14 @@ message NodeConfig { repeated string tags = 8; // Whether the nodes are created as preemptible VM instances. See: - // https://cloud.google.com/compute/docs/instances/preemptible for more - // information about preemptible VM instances. + // https://cloud.google.com/compute/docs/instances/preemptible + // for more information about preemptible VM instances. bool preemptible = 10; // A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. + // See + // https://cloud.google.com/compute/docs/gpus + // for more information about support for GPUs. repeated AcceleratorConfig accelerators = 11; // Type of the disk attached to each node (e.g. 'pd-standard', 'pd-ssd' or @@ -1109,11 +1363,14 @@ message NodeConfig { // Flex Start flag for enabling Flex Start VM. optional bool flex_start = 56; + + // The boot disk configuration for the node pool. + BootDisk boot_disk = 57; } // Specifies options for controlling advanced machine features. message AdvancedMachineFeatures { - // Level of PMU access + // Level of PMU access. enum PerformanceMonitoringUnit { // PMU not enabled. PERFORMANCE_MONITORING_UNIT_UNSPECIFIED = 0; @@ -1234,6 +1491,13 @@ message NodeNetworkConfig { // Usage=numNodes*numZones*podIPsPerNode. double pod_ipv4_range_utilization = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The subnetwork path for the node pool. + // Format: projects/{project}/regions/{region}/subnetworks/{subnetwork} + // If the cluster is associated with multiple subnetworks, the subnetwork for + // the node pool is picked based on the IP utilization during node pool + // creation and is immutable. + string subnetwork = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; } // AdditionalNodeNetworkConfig is the configuration for additional node networks @@ -1365,6 +1629,11 @@ message SoleTenantConfig { // NodeAffinities used to match to a shared sole tenant node group. repeated NodeAffinity node_affinities = 1; + + // Optional. The minimum number of virtual CPUs this instance will consume + // when running on a sole-tenant node. This field can only be set if the node + // pool is created in a shared sole-tenant node group. + optional int32 min_node_cpus = 2 [(google.api.field_behavior) = OPTIONAL]; } // ContainerdConfig contains configuration to customize containerd. @@ -1376,7 +1645,8 @@ message ContainerdConfig { // domain names (FQDN) to a specific certificate. message CertificateAuthorityDomainConfig { // GCPSecretManagerCertificateConfig configures a secret from - // [Google Secret Manager](https://cloud.google.com/secret-manager). + // [Google Secret + // Manager](https://cloud.google.com/secret-manager). message GCPSecretManagerCertificateConfig { // Secret URI, in the form // "projects/$PROJECT_ID/secrets/$SECRET_NAME/versions/$VERSION". @@ -1585,6 +1855,9 @@ message AddonsConfig { // Configuration for the High Scale Checkpointing add-on. HighScaleCheckpointingConfig high_scale_checkpointing_config = 22; + + // Configuration for the Lustre CSI driver. + LustreCsiDriverConfig lustre_csi_driver_config = 23; } // Configuration options for the HTTP (L7) load balancing controller addon, @@ -1763,6 +2036,16 @@ message HighScaleCheckpointingConfig { bool enabled = 1; } +// Configuration for the Lustre CSI driver. +message LustreCsiDriverConfig { + // Whether the Lustre CSI driver is enabled for this cluster. + bool enabled = 1; + + // If set to true, the Lustre CSI driver will install Lustre kernel modules + // using port 6988. + bool enable_legacy_lustre_port = 3; +} + // Configuration options for the Ray Operator add-on. message RayOperatorConfig { // Whether the Ray Operator addon is enabled for this cluster. @@ -2041,6 +2324,17 @@ message IPAllocationPolicy { // Usage=numNodes*numZones*podIPsPerNode. double default_pod_ipv4_range_utilization = 25 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The additional IP ranges that are added to the cluster. + // These IP ranges can be used by new node pools to allocate node and pod IPs + // automatically. + // Each AdditionalIPRangesConfig corresponds to a single subnetwork. + // Once a range is removed it will not show up in IPAllocationPolicy. + repeated AdditionalIPRangesConfig additional_ip_ranges_configs = 29 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. AutoIpamConfig contains all information related to Auto IPAM + AutoIpamConfig auto_ipam_config = 30 [(google.api.field_behavior) = OPTIONAL]; } // A Google Kubernetes Engine cluster. @@ -2087,7 +2381,8 @@ message Cluster { string description = 2; // The number of nodes to create in this cluster. You must ensure that your - // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + // Compute Engine [resource + // quota](https://cloud.google.com/compute/quotas) // is sufficient for this number of instances. You must also have available // firewall and routes quota. // For requests, this field should only be used in lieu of a @@ -2160,8 +2455,8 @@ message Cluster { AddonsConfig addons_config = 10; // The name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) to which - // the cluster is connected. + // [subnetwork](https://cloud.google.com/compute/docs/subnetworks) + // to which the cluster is connected. string subnetwork = 11; // The node pools associated with this cluster. @@ -2170,8 +2465,8 @@ message Cluster { repeated NodePool node_pools = 12; // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. + // [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster's nodes should be located. // // This field provides a default value if // [NodePool.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters.nodePools#NodePool.FIELDS.locations) @@ -2288,8 +2583,9 @@ message Cluster { string self_link = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field is deprecated, use location instead. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field is deprecated, use location + // instead. string zone = 101 [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; @@ -2452,6 +2748,9 @@ message Cluster { // RoleBindings that can be created. optional RBACBindingConfig rbac_binding_config = 156; + // Configuration for GKE auto upgrades. + GkeAutoUpgradeConfig gke_auto_upgrade_config = 163; + // Configuration for limiting anonymous access to all endpoints except the // health checks. AnonymousAuthenticationConfig anonymous_authentication_config = 164; @@ -2533,7 +2832,23 @@ message UserManagedKeysConfig { // AnonymousAuthenticationConfig defines the settings needed to limit endpoints // that allow anonymous authentication. -message AnonymousAuthenticationConfig {} +message AnonymousAuthenticationConfig { + // Mode defines the mode of anonymous authentication + // allowed in the cluster. + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Anonymous authentication is allowed for all endpoints. + ENABLED = 1; + + // Anonymous authentication is allowed for only health check endpoints. + LIMITED = 2; + } + + // Defines the mode of limiting anonymous access in the cluster. + Mode mode = 1; +} // CompliancePostureConfig defines the settings needed to enable/disable // features for the Compliance Posture. @@ -2725,8 +3040,8 @@ message ClusterUpdate { NodePoolAutoscaling desired_node_pool_autoscaling = 9; // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. + // [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster's nodes should be located. // // This list must always include the cluster's primary zone. // @@ -2933,15 +3248,26 @@ message ClusterUpdate { NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; // The Custom keys configuration for the cluster. - UserManagedKeysConfig user_managed_keys_config = 143; + // + // This field is deprecated. + // Use + // [ClusterUpdate.desired_user_managed_keys_config][google.container.v1.ClusterUpdate.desired_user_managed_keys_config] + // instead. + UserManagedKeysConfig user_managed_keys_config = 143 [deprecated = true]; // RBACBindingConfig allows user to restrict ClusterRoleBindings an // RoleBindings that can be created. optional RBACBindingConfig desired_rbac_binding_config = 144; + // The desired config for additional subnetworks attached to the cluster. + DesiredAdditionalIPRangesConfig desired_additional_ip_ranges_config = 145; + // The desired enterprise configuration for the cluster. DesiredEnterpriseConfig desired_enterprise_config = 147; + // AutoIpamConfig contains all information related to Auto IPAM + AutoIpamConfig desired_auto_ipam_config = 148; + // Enable/Disable L4 LB VPC firewall reconciliation for the cluster. optional bool desired_disable_l4_lb_firewall_reconciliation = 149; @@ -2951,9 +3277,15 @@ message ClusterUpdate { // Currently only `cgroup_mode` can be set here. LinuxNodeConfig desired_node_pool_auto_config_linux_node_config = 150; + // The desired user managed keys config for the cluster. + UserManagedKeysConfig desired_user_managed_keys_config = 152; + // Configuration for limiting anonymous access to all endpoints except the // health checks. AnonymousAuthenticationConfig desired_anonymous_authentication_config = 156; + + // Configuration for GKE auto upgrade. + GkeAutoUpgradeConfig gke_auto_upgrade_config = 154; } // AdditionalPodRangesConfig is the configuration for additional pod secondary @@ -2967,6 +3299,33 @@ message AdditionalPodRangesConfig { [(google.api.field_behavior) = OUTPUT_ONLY]; } +// AdditionalIPRangesConfig is the configuration for individual additional +// subnetwork attached to the cluster +message AdditionalIPRangesConfig { + // Name of the subnetwork. This can be the full path of the subnetwork or + // just the name. + // Example1: my-subnet + // Example2: projects/gke-project/regions/us-central1/subnetworks/my-subnet + string subnetwork = 1; + + // List of secondary ranges names within this subnetwork that can be used for + // pod IPs. + // Example1: gke-pod-range1 + // Example2: gke-pod-range1,gke-pod-range2 + repeated string pod_ipv4_range_names = 2; +} + +// DesiredAdditionalIPRangesConfig is a wrapper used for cluster update +// operation and contains multiple AdditionalIPRangesConfigs. +message DesiredAdditionalIPRangesConfig { + // List of additional IP ranges configs where each AdditionalIPRangesConfig + // corresponds to one subnetwork's IP ranges + repeated AdditionalIPRangesConfig additional_ip_ranges_configs = 1; +} + +// AutoIpamConfig contains all information related to Auto IPAM +message AutoIpamConfig {} + // RangeInfo contains the range name and the range utilization by this cluster. message RangeInfo { // Output only. Name of a range. @@ -3133,8 +3492,9 @@ message Operation { string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // operation is taking place. This field is deprecated, use location instead. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the operation is taking place. This field is deprecated, use + // location instead. string zone = 2 [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; @@ -3251,9 +3611,9 @@ message CreateClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the parent field. string zone = 2 [deprecated = true]; // Required. A [cluster @@ -3273,9 +3633,9 @@ message GetClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to retrieve. @@ -3295,9 +3655,9 @@ message UpdateClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3320,9 +3680,9 @@ message UpdateNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3347,8 +3707,8 @@ message UpdateNodePoolRequest { string node_version = 5 [(google.api.field_behavior) = REQUIRED]; // Required. The desired image type for the node pool. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + // for available image types. string image_type = 6 [(google.api.field_behavior) = REQUIRED]; // The name (project, location, cluster, node pool) of the node pool to @@ -3357,10 +3717,10 @@ message UpdateNodePoolRequest { string name = 8; // The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // node pool's nodes should be located. Changing the locations for a node pool - // will result in nodes being either created or removed from the node pool, - // depending on whether locations are being added or removed. + // [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the node pool's nodes should be located. Changing the locations + // for a node pool will result in nodes being either created or removed from + // the node pool, depending on whether locations are being added or removed. repeated string locations = 13; // The desired workload metadata config for the node pool. @@ -3422,14 +3782,15 @@ message UpdateNodePoolRequest { WindowsNodeConfig windows_node_config = 34; // A list of hardware accelerators to be attached to each node. - // See https://cloud.google.com/compute/docs/gpus for more information about - // support for GPUs. + // See + // https://cloud.google.com/compute/docs/gpus + // for more information about support for GPUs. repeated AcceleratorConfig accelerators = 35; // Optional. The desired [Google Compute Engine machine - // type](https://cloud.google.com/compute/docs/machine-types) for nodes in the - // node pool. Initiates an upgrade operation that migrates the nodes in the - // node pool to the specified machine type. + // type](https://cloud.google.com/compute/docs/machine-types) + // for nodes in the node pool. Initiates an upgrade operation that migrates + // the nodes in the node pool to the specified machine type. string machine_type = 36 [(google.api.field_behavior) = OPTIONAL]; // Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or @@ -3467,6 +3828,11 @@ message UpdateNodePoolRequest { // Flex Start flag for enabling Flex Start VM. optional bool flex_start = 46; + + // The desired boot disk config for nodes in the node pool. + // Initiates an upgrade operation that migrates the nodes in the + // node pool to the specified boot disk config. + BootDisk boot_disk = 47; } // SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. @@ -3477,9 +3843,9 @@ message SetNodePoolAutoscalingRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3507,9 +3873,9 @@ message SetLoggingServiceRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3542,9 +3908,9 @@ message SetMonitoringServiceRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3577,9 +3943,9 @@ message SetAddonsConfigRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3603,9 +3969,9 @@ message SetLocationsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3613,10 +3979,10 @@ message SetLocationsRequest { string cluster_id = 3 [deprecated = true]; // Required. The desired list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster's nodes should be located. Changing the locations a cluster is in - // will result in nodes being either created or removed from the cluster, - // depending on whether locations are being added or removed. + // [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster's nodes should be located. Changing the locations a + // cluster is in will result in nodes being either created or removed from the + // cluster, depending on whether locations are being added or removed. // // This list must always include the cluster's primary zone. repeated string locations = 4 [(google.api.field_behavior) = REQUIRED]; @@ -3634,9 +4000,9 @@ message UpdateMasterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3686,9 +4052,9 @@ message SetMasterAuthRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to upgrade. @@ -3714,9 +4080,9 @@ message DeleteClusterRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to delete. @@ -3736,9 +4102,9 @@ message ListClustersRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides, or "-" for all zones. This field has been deprecated and - // replaced by the parent field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides, or "-" for all zones. This field has been + // deprecated and replaced by the parent field. string zone = 2 [deprecated = true]; // The parent (project and location) where the clusters will be listed. @@ -3766,9 +4132,9 @@ message GetOperationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The server-assigned `name` of the operation. @@ -3788,9 +4154,9 @@ message ListOperationsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) to return - // operations for, or `-` for all zones. This field has been deprecated and - // replaced by the parent field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // to return operations for, or `-` for all zones. This field has been + // deprecated and replaced by the parent field. string zone = 2 [deprecated = true]; // The parent (project and location) where the operations will be listed. @@ -3807,9 +4173,9 @@ message CancelOperationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // operation resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the operation resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The server-assigned `name` of the operation. @@ -3839,9 +4205,9 @@ message GetServerConfigRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) to return - // operations for. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // to return operations for. This field has been deprecated and replaced by + // the name field. string zone = 2 [deprecated = true]; // The name (project and location) of the server config to get, @@ -3893,9 +4259,9 @@ message CreateNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the parent field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -3919,9 +4285,9 @@ message DeleteNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -3946,9 +4312,9 @@ message ListNodePoolsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the parent - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the parent field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -3968,9 +4334,9 @@ message GetNodePoolRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -4215,14 +4581,15 @@ message NodePool { NodeConfig config = 2; // The initial node count for the pool. You must ensure that your - // Compute Engine [resource quota](https://cloud.google.com/compute/quotas) + // Compute Engine [resource + // quota](https://cloud.google.com/compute/quotas) // is sufficient for this number of instances. You must also have available // firewall and routes quota. int32 initial_node_count = 3; // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes should be located. + // [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the NodePool's nodes should be located. // // If this value is unspecified during node pool creation, the // [Cluster.Locations](https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters#Cluster.FIELDS.locations) @@ -4478,9 +4845,9 @@ message SetNodePoolManagementRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to update. @@ -4508,9 +4875,9 @@ message SetNodePoolSizeRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to update. @@ -4549,9 +4916,9 @@ message RollbackNodePoolUpgradeRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to rollback. @@ -4610,9 +4977,12 @@ message ClusterAutoscaling { AutoprovisioningNodePoolDefaults autoprovisioning_node_pool_defaults = 4; // The list of Google Compute Engine - // [zones](https://cloud.google.com/compute/docs/zones#available) in which the - // NodePool's nodes can be created by NAP. + // [zones](https://cloud.google.com/compute/docs/zones#available) + // in which the NodePool's nodes can be created by NAP. repeated string autoprovisioning_locations = 5; + + // Default compute class is a configuration for default compute class. + DefaultComputeClassConfig default_compute_class_config = 9; } // AutoprovisioningNodePoolDefaults contains defaults for a node pool created @@ -4667,8 +5037,8 @@ message AutoprovisioningNodePoolDefaults { string boot_disk_kms_key = 9; // The image type to use for NAP created node. Please see - // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - // available image types. + // https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + // for available image types. string image_type = 10; // DEPRECATED. Use NodePoolAutoConfig.NodeKubeletConfig instead. @@ -4688,6 +5058,13 @@ message ResourceLimit { int64 maximum = 3; } +// DefaultComputeClassConfig defines default compute class +// configuration. +message DefaultComputeClassConfig { + // Enables default compute class. + bool enabled = 1; +} + // NodePoolAutoscaling contains information required by cluster autoscaler to // adjust the size of the node pool to the current cluster usage. message NodePoolAutoscaling { @@ -4745,9 +5122,9 @@ message SetLabelsRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -4780,9 +5157,9 @@ message SetLegacyAbacRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster to update. @@ -4806,9 +5183,9 @@ message StartIPRotationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -4831,9 +5208,9 @@ message CompleteIPRotationRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -4943,9 +5320,9 @@ message SetNetworkPolicyRequest { string project_id = 1 [deprecated = true]; // Deprecated. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. This field has been deprecated and replaced by the name - // field. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. This field has been deprecated and replaced + // by the name field. string zone = 2 [deprecated = true]; // Deprecated. The name of the cluster. @@ -4967,8 +5344,8 @@ message SetMaintenancePolicyRequest { string project_id = 1 [(google.api.field_behavior) = REQUIRED]; // Required. The name of the Google Compute Engine - // [zone](https://cloud.google.com/compute/docs/zones#available) in which the - // cluster resides. + // [zone](https://cloud.google.com/compute/docs/zones#available) + // in which the cluster resides. string zone = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The name of the cluster to update. @@ -5016,6 +5393,10 @@ message StatusCondition { // Node service account is missing permissions. NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS = 10; + + // Cloud KMS key version used for etcd level encryption has been destroyed. + // This is a permanent error. + CLOUD_KMS_KEY_DESTROYED = 11; } // Machine-friendly representation of the condition @@ -5053,8 +5434,8 @@ message NetworkConfig { string network = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The relative name of the Google Compute Engine - // [subnetwork](https://cloud.google.com/compute/docs/vpc) to which the - // cluster is connected. Example: + // [subnetwork](https://cloud.google.com/compute/docs/vpc) + // to which the cluster is connected. Example: // projects/my-project/regions/us-central1/subnetworks/my-subnet string subnetwork = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -6397,6 +6778,22 @@ message SecretManagerConfig { optional bool enabled = 1; } +// BootDisk specifies the boot disk configuration for nodepools. +message BootDisk { + // Disk type of the boot disk. + // (i.e. Hyperdisk-Balanced, PD-Balanced, etc.) + string disk_type = 1; + + // Disk size in GB. Replaces NodeConfig.disk_size_gb + int64 size_gb = 2; + + // For Hyperdisk-Balanced only, the provisioned IOPS config value. + int64 provisioned_iops = 3; + + // For Hyperdisk-Balanced only, the provisioned throughput config value. + int64 provisioned_throughput = 4; +} + // SecondaryBootDisk represents a persistent disk attached to a node // with special configurations based on its mode. message SecondaryBootDisk { @@ -6642,3 +7039,23 @@ message NodePoolUpgradeInfo { // The nodepool's current minor version's end of extended support timestamp. optional string end_of_extended_support_timestamp = 7; } + +// GkeAutoUpgradeConfig is the configuration for GKE auto upgrades. +message GkeAutoUpgradeConfig { + // PatchMode specifies how auto upgrade patch builds should be + // selected. + enum PatchMode { + // PATCH_MODE_UNSPECIFIED defaults to using the upgrade target from the + // channel's patch upgrade targets as the upgrade target for the + // version. + PATCH_MODE_UNSPECIFIED = 0; + + // ACCELERATED denotes that the latest patch build in the channel should be + // used as the upgrade target for the version. + ACCELERATED = 1; + } + + // PatchMode specifies how auto upgrade patch builds should be + // selected. + PatchMode patch_mode = 1; +} diff --git a/packages/google-container/protos/protos.d.ts b/packages/google-container/protos/protos.d.ts index 7a9dd2260d6d..8ea0bed867e0 100644 --- a/packages/google-container/protos/protos.d.ts +++ b/packages/google-container/protos/protos.d.ts @@ -814,6 +814,12 @@ export namespace google { /** LinuxNodeConfig hugepages */ hugepages?: (google.container.v1.LinuxNodeConfig.IHugepagesConfig|null); + + /** LinuxNodeConfig transparentHugepageEnabled */ + transparentHugepageEnabled?: (google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled|keyof typeof google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled|null); + + /** LinuxNodeConfig transparentHugepageDefrag */ + transparentHugepageDefrag?: (google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag|keyof typeof google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag|null); } /** Represents a LinuxNodeConfig. */ @@ -834,6 +840,12 @@ export namespace google { /** LinuxNodeConfig hugepages. */ public hugepages?: (google.container.v1.LinuxNodeConfig.IHugepagesConfig|null); + /** LinuxNodeConfig transparentHugepageEnabled. */ + public transparentHugepageEnabled: (google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled|keyof typeof google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled); + + /** LinuxNodeConfig transparentHugepageDefrag. */ + public transparentHugepageDefrag: (google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag|keyof typeof google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag); + /** * Creates a new LinuxNodeConfig instance using the specified properties. * @param [properties] Properties to set @@ -1023,6 +1035,24 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** TransparentHugepageEnabled enum. */ + enum TransparentHugepageEnabled { + TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED = 0, + TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS = 1, + TRANSPARENT_HUGEPAGE_ENABLED_MADVISE = 2, + TRANSPARENT_HUGEPAGE_ENABLED_NEVER = 3 + } + + /** TransparentHugepageDefrag enum. */ + enum TransparentHugepageDefrag { + TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED = 0, + TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS = 1, + TRANSPARENT_HUGEPAGE_DEFRAG_DEFER = 2, + TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE = 3, + TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE = 4, + TRANSPARENT_HUGEPAGE_DEFRAG_NEVER = 5 + } } /** Properties of a WindowsNodeConfig. */ @@ -1176,6 +1206,24 @@ export namespace google { /** NodeKubeletConfig allowedUnsafeSysctls */ allowedUnsafeSysctls?: (string[]|null); + + /** NodeKubeletConfig evictionSoft */ + evictionSoft?: (google.container.v1.IEvictionSignals|null); + + /** NodeKubeletConfig evictionSoftGracePeriod */ + evictionSoftGracePeriod?: (google.container.v1.IEvictionGracePeriod|null); + + /** NodeKubeletConfig evictionMinimumReclaim */ + evictionMinimumReclaim?: (google.container.v1.IEvictionMinimumReclaim|null); + + /** NodeKubeletConfig evictionMaxPodGracePeriodSeconds */ + evictionMaxPodGracePeriodSeconds?: (number|null); + + /** NodeKubeletConfig maxParallelImagePulls */ + maxParallelImagePulls?: (number|null); + + /** NodeKubeletConfig singleProcessOomKill */ + singleProcessOomKill?: (boolean|null); } /** Represents a NodeKubeletConfig. */ @@ -1229,6 +1277,24 @@ export namespace google { /** NodeKubeletConfig allowedUnsafeSysctls. */ public allowedUnsafeSysctls: string[]; + /** NodeKubeletConfig evictionSoft. */ + public evictionSoft?: (google.container.v1.IEvictionSignals|null); + + /** NodeKubeletConfig evictionSoftGracePeriod. */ + public evictionSoftGracePeriod?: (google.container.v1.IEvictionGracePeriod|null); + + /** NodeKubeletConfig evictionMinimumReclaim. */ + public evictionMinimumReclaim?: (google.container.v1.IEvictionMinimumReclaim|null); + + /** NodeKubeletConfig evictionMaxPodGracePeriodSeconds. */ + public evictionMaxPodGracePeriodSeconds: number; + + /** NodeKubeletConfig maxParallelImagePulls. */ + public maxParallelImagePulls: number; + + /** NodeKubeletConfig singleProcessOomKill. */ + public singleProcessOomKill?: (boolean|null); + /** * Creates a new NodeKubeletConfig instance using the specified properties. * @param [properties] Properties to set @@ -1507,6 +1573,387 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an EvictionSignals. */ + interface IEvictionSignals { + + /** EvictionSignals memoryAvailable */ + memoryAvailable?: (string|null); + + /** EvictionSignals nodefsAvailable */ + nodefsAvailable?: (string|null); + + /** EvictionSignals nodefsInodesFree */ + nodefsInodesFree?: (string|null); + + /** EvictionSignals imagefsAvailable */ + imagefsAvailable?: (string|null); + + /** EvictionSignals imagefsInodesFree */ + imagefsInodesFree?: (string|null); + + /** EvictionSignals pidAvailable */ + pidAvailable?: (string|null); + } + + /** Represents an EvictionSignals. */ + class EvictionSignals implements IEvictionSignals { + + /** + * Constructs a new EvictionSignals. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IEvictionSignals); + + /** EvictionSignals memoryAvailable. */ + public memoryAvailable: string; + + /** EvictionSignals nodefsAvailable. */ + public nodefsAvailable: string; + + /** EvictionSignals nodefsInodesFree. */ + public nodefsInodesFree: string; + + /** EvictionSignals imagefsAvailable. */ + public imagefsAvailable: string; + + /** EvictionSignals imagefsInodesFree. */ + public imagefsInodesFree: string; + + /** EvictionSignals pidAvailable. */ + public pidAvailable: string; + + /** + * Creates a new EvictionSignals instance using the specified properties. + * @param [properties] Properties to set + * @returns EvictionSignals instance + */ + public static create(properties?: google.container.v1.IEvictionSignals): google.container.v1.EvictionSignals; + + /** + * Encodes the specified EvictionSignals message. Does not implicitly {@link google.container.v1.EvictionSignals.verify|verify} messages. + * @param message EvictionSignals message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IEvictionSignals, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvictionSignals message, length delimited. Does not implicitly {@link google.container.v1.EvictionSignals.verify|verify} messages. + * @param message EvictionSignals message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IEvictionSignals, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvictionSignals message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvictionSignals + * @throws {Error} If the payload is not 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.EvictionSignals; + + /** + * Decodes an EvictionSignals message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvictionSignals + * @throws {Error} If the payload 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.EvictionSignals; + + /** + * Verifies an EvictionSignals message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EvictionSignals message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvictionSignals + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.EvictionSignals; + + /** + * Creates a plain object from an EvictionSignals message. Also converts values to other types if specified. + * @param message EvictionSignals + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.EvictionSignals, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvictionSignals to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvictionSignals + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EvictionGracePeriod. */ + interface IEvictionGracePeriod { + + /** EvictionGracePeriod memoryAvailable */ + memoryAvailable?: (string|null); + + /** EvictionGracePeriod nodefsAvailable */ + nodefsAvailable?: (string|null); + + /** EvictionGracePeriod nodefsInodesFree */ + nodefsInodesFree?: (string|null); + + /** EvictionGracePeriod imagefsAvailable */ + imagefsAvailable?: (string|null); + + /** EvictionGracePeriod imagefsInodesFree */ + imagefsInodesFree?: (string|null); + + /** EvictionGracePeriod pidAvailable */ + pidAvailable?: (string|null); + } + + /** Represents an EvictionGracePeriod. */ + class EvictionGracePeriod implements IEvictionGracePeriod { + + /** + * Constructs a new EvictionGracePeriod. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IEvictionGracePeriod); + + /** EvictionGracePeriod memoryAvailable. */ + public memoryAvailable: string; + + /** EvictionGracePeriod nodefsAvailable. */ + public nodefsAvailable: string; + + /** EvictionGracePeriod nodefsInodesFree. */ + public nodefsInodesFree: string; + + /** EvictionGracePeriod imagefsAvailable. */ + public imagefsAvailable: string; + + /** EvictionGracePeriod imagefsInodesFree. */ + public imagefsInodesFree: string; + + /** EvictionGracePeriod pidAvailable. */ + public pidAvailable: string; + + /** + * Creates a new EvictionGracePeriod instance using the specified properties. + * @param [properties] Properties to set + * @returns EvictionGracePeriod instance + */ + public static create(properties?: google.container.v1.IEvictionGracePeriod): google.container.v1.EvictionGracePeriod; + + /** + * Encodes the specified EvictionGracePeriod message. Does not implicitly {@link google.container.v1.EvictionGracePeriod.verify|verify} messages. + * @param message EvictionGracePeriod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IEvictionGracePeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvictionGracePeriod message, length delimited. Does not implicitly {@link google.container.v1.EvictionGracePeriod.verify|verify} messages. + * @param message EvictionGracePeriod message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IEvictionGracePeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvictionGracePeriod message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvictionGracePeriod + * @throws {Error} If the payload is not 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.EvictionGracePeriod; + + /** + * Decodes an EvictionGracePeriod message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvictionGracePeriod + * @throws {Error} If the payload 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.EvictionGracePeriod; + + /** + * Verifies an EvictionGracePeriod message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EvictionGracePeriod message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvictionGracePeriod + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.EvictionGracePeriod; + + /** + * Creates a plain object from an EvictionGracePeriod message. Also converts values to other types if specified. + * @param message EvictionGracePeriod + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.EvictionGracePeriod, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvictionGracePeriod to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvictionGracePeriod + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EvictionMinimumReclaim. */ + interface IEvictionMinimumReclaim { + + /** EvictionMinimumReclaim memoryAvailable */ + memoryAvailable?: (string|null); + + /** EvictionMinimumReclaim nodefsAvailable */ + nodefsAvailable?: (string|null); + + /** EvictionMinimumReclaim nodefsInodesFree */ + nodefsInodesFree?: (string|null); + + /** EvictionMinimumReclaim imagefsAvailable */ + imagefsAvailable?: (string|null); + + /** EvictionMinimumReclaim imagefsInodesFree */ + imagefsInodesFree?: (string|null); + + /** EvictionMinimumReclaim pidAvailable */ + pidAvailable?: (string|null); + } + + /** Represents an EvictionMinimumReclaim. */ + class EvictionMinimumReclaim implements IEvictionMinimumReclaim { + + /** + * Constructs a new EvictionMinimumReclaim. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IEvictionMinimumReclaim); + + /** EvictionMinimumReclaim memoryAvailable. */ + public memoryAvailable: string; + + /** EvictionMinimumReclaim nodefsAvailable. */ + public nodefsAvailable: string; + + /** EvictionMinimumReclaim nodefsInodesFree. */ + public nodefsInodesFree: string; + + /** EvictionMinimumReclaim imagefsAvailable. */ + public imagefsAvailable: string; + + /** EvictionMinimumReclaim imagefsInodesFree. */ + public imagefsInodesFree: string; + + /** EvictionMinimumReclaim pidAvailable. */ + public pidAvailable: string; + + /** + * Creates a new EvictionMinimumReclaim instance using the specified properties. + * @param [properties] Properties to set + * @returns EvictionMinimumReclaim instance + */ + public static create(properties?: google.container.v1.IEvictionMinimumReclaim): google.container.v1.EvictionMinimumReclaim; + + /** + * Encodes the specified EvictionMinimumReclaim message. Does not implicitly {@link google.container.v1.EvictionMinimumReclaim.verify|verify} messages. + * @param message EvictionMinimumReclaim message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IEvictionMinimumReclaim, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvictionMinimumReclaim message, length delimited. Does not implicitly {@link google.container.v1.EvictionMinimumReclaim.verify|verify} messages. + * @param message EvictionMinimumReclaim message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IEvictionMinimumReclaim, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvictionMinimumReclaim message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EvictionMinimumReclaim + * @throws {Error} If the payload is not 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.EvictionMinimumReclaim; + + /** + * Decodes an EvictionMinimumReclaim message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EvictionMinimumReclaim + * @throws {Error} If the payload 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.EvictionMinimumReclaim; + + /** + * Verifies an EvictionMinimumReclaim message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EvictionMinimumReclaim message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvictionMinimumReclaim + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.EvictionMinimumReclaim; + + /** + * Creates a plain object from an EvictionMinimumReclaim message. Also converts values to other types if specified. + * @param message EvictionMinimumReclaim + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.EvictionMinimumReclaim, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvictionMinimumReclaim to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EvictionMinimumReclaim + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a NodeConfig. */ interface INodeConfig { @@ -1641,6 +2088,9 @@ export namespace google { /** NodeConfig flexStart */ flexStart?: (boolean|null); + + /** NodeConfig bootDisk */ + bootDisk?: (google.container.v1.IBootDisk|null); } /** Represents a NodeConfig. */ @@ -1784,6 +2234,9 @@ export namespace google { /** NodeConfig flexStart. */ public flexStart?: (boolean|null); + /** NodeConfig bootDisk. */ + public bootDisk?: (google.container.v1.IBootDisk|null); + /** * Creates a new NodeConfig instance using the specified properties. * @param [properties] Properties to set @@ -2028,6 +2481,9 @@ export namespace google { /** NodeNetworkConfig podIpv4RangeUtilization */ podIpv4RangeUtilization?: (number|null); + + /** NodeNetworkConfig subnetwork */ + subnetwork?: (string|null); } /** Represents a NodeNetworkConfig. */ @@ -2066,6 +2522,9 @@ export namespace google { /** NodeNetworkConfig podIpv4RangeUtilization. */ public podIpv4RangeUtilization: number; + /** NodeNetworkConfig subnetwork. */ + public subnetwork: string; + /** * Creates a new NodeNetworkConfig instance using the specified properties. * @param [properties] Properties to set @@ -2896,6 +3355,9 @@ export namespace google { /** SoleTenantConfig nodeAffinities */ nodeAffinities?: (google.container.v1.SoleTenantConfig.INodeAffinity[]|null); + + /** SoleTenantConfig minNodeCpus */ + minNodeCpus?: (number|null); } /** Represents a SoleTenantConfig. */ @@ -2910,6 +3372,9 @@ export namespace google { /** SoleTenantConfig nodeAffinities. */ public nodeAffinities: google.container.v1.SoleTenantConfig.INodeAffinity[]; + /** SoleTenantConfig minNodeCpus. */ + public minNodeCpus?: (number|null); + /** * Creates a new SoleTenantConfig instance using the specified properties. * @param [properties] Properties to set @@ -4301,6 +4766,9 @@ export namespace google { /** AddonsConfig highScaleCheckpointingConfig */ highScaleCheckpointingConfig?: (google.container.v1.IHighScaleCheckpointingConfig|null); + + /** AddonsConfig lustreCsiDriverConfig */ + lustreCsiDriverConfig?: (google.container.v1.ILustreCsiDriverConfig|null); } /** Represents an AddonsConfig. */ @@ -4357,6 +4825,9 @@ export namespace google { /** AddonsConfig highScaleCheckpointingConfig. */ public highScaleCheckpointingConfig?: (google.container.v1.IHighScaleCheckpointingConfig|null); + /** AddonsConfig lustreCsiDriverConfig. */ + public lustreCsiDriverConfig?: (google.container.v1.ILustreCsiDriverConfig|null); + /** * Creates a new AddonsConfig instance using the specified properties. * @param [properties] Properties to set @@ -5954,6 +6425,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a LustreCsiDriverConfig. */ + interface ILustreCsiDriverConfig { + + /** LustreCsiDriverConfig enabled */ + enabled?: (boolean|null); + + /** LustreCsiDriverConfig enableLegacyLustrePort */ + enableLegacyLustrePort?: (boolean|null); + } + + /** Represents a LustreCsiDriverConfig. */ + class LustreCsiDriverConfig implements ILustreCsiDriverConfig { + + /** + * Constructs a new LustreCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ILustreCsiDriverConfig); + + /** LustreCsiDriverConfig enabled. */ + public enabled: boolean; + + /** LustreCsiDriverConfig enableLegacyLustrePort. */ + public enableLegacyLustrePort: boolean; + + /** + * Creates a new LustreCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LustreCsiDriverConfig instance + */ + public static create(properties?: google.container.v1.ILustreCsiDriverConfig): google.container.v1.LustreCsiDriverConfig; + + /** + * Encodes the specified LustreCsiDriverConfig message. Does not implicitly {@link google.container.v1.LustreCsiDriverConfig.verify|verify} messages. + * @param message LustreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ILustreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LustreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.LustreCsiDriverConfig.verify|verify} messages. + * @param message LustreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ILustreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LustreCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LustreCsiDriverConfig + * @throws {Error} If the payload is not 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.LustreCsiDriverConfig; + + /** + * Decodes a LustreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LustreCsiDriverConfig + * @throws {Error} If the payload 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.LustreCsiDriverConfig; + + /** + * Verifies a LustreCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LustreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LustreCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.LustreCsiDriverConfig; + + /** + * Creates a plain object from a LustreCsiDriverConfig message. Also converts values to other types if specified. + * @param message LustreCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.LustreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LustreCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LustreCsiDriverConfig + * @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 { @@ -6959,6 +7533,12 @@ export namespace google { /** IPAllocationPolicy defaultPodIpv4RangeUtilization */ defaultPodIpv4RangeUtilization?: (number|null); + + /** IPAllocationPolicy additionalIpRangesConfigs */ + additionalIpRangesConfigs?: (google.container.v1.IAdditionalIPRangesConfig[]|null); + + /** IPAllocationPolicy autoIpamConfig */ + autoIpamConfig?: (google.container.v1.IAutoIpamConfig|null); } /** Represents a IPAllocationPolicy. */ @@ -7030,6 +7610,12 @@ export namespace google { /** IPAllocationPolicy defaultPodIpv4RangeUtilization. */ public defaultPodIpv4RangeUtilization: number; + /** IPAllocationPolicy additionalIpRangesConfigs. */ + public additionalIpRangesConfigs: google.container.v1.IAdditionalIPRangesConfig[]; + + /** IPAllocationPolicy autoIpamConfig. */ + public autoIpamConfig?: (google.container.v1.IAutoIpamConfig|null); + /** * Creates a new IPAllocationPolicy instance using the specified properties. * @param [properties] Properties to set @@ -7339,6 +7925,9 @@ export namespace google { /** Cluster rbacBindingConfig */ rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + /** Cluster gkeAutoUpgradeConfig */ + gkeAutoUpgradeConfig?: (google.container.v1.IGkeAutoUpgradeConfig|null); + /** Cluster anonymousAuthenticationConfig */ anonymousAuthenticationConfig?: (google.container.v1.IAnonymousAuthenticationConfig|null); } @@ -7580,6 +8169,9 @@ export namespace google { /** Cluster rbacBindingConfig. */ public rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + /** Cluster gkeAutoUpgradeConfig. */ + public gkeAutoUpgradeConfig?: (google.container.v1.IGkeAutoUpgradeConfig|null); + /** Cluster anonymousAuthenticationConfig. */ public anonymousAuthenticationConfig?: (google.container.v1.IAnonymousAuthenticationConfig|null); @@ -7919,6 +8511,9 @@ export namespace google { /** Properties of an AnonymousAuthenticationConfig. */ interface IAnonymousAuthenticationConfig { + + /** AnonymousAuthenticationConfig mode */ + mode?: (google.container.v1.AnonymousAuthenticationConfig.Mode|keyof typeof google.container.v1.AnonymousAuthenticationConfig.Mode|null); } /** Represents an AnonymousAuthenticationConfig. */ @@ -7930,6 +8525,9 @@ export namespace google { */ constructor(properties?: google.container.v1.IAnonymousAuthenticationConfig); + /** AnonymousAuthenticationConfig mode. */ + public mode: (google.container.v1.AnonymousAuthenticationConfig.Mode|keyof typeof google.container.v1.AnonymousAuthenticationConfig.Mode); + /** * Creates a new AnonymousAuthenticationConfig instance using the specified properties. * @param [properties] Properties to set @@ -8008,6 +8606,16 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace AnonymousAuthenticationConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + ENABLED = 1, + LIMITED = 2 + } + } + /** Properties of a CompliancePostureConfig. */ interface ICompliancePostureConfig { @@ -8956,17 +9564,29 @@ export namespace google { /** ClusterUpdate desiredRbacBindingConfig */ desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + /** ClusterUpdate desiredAdditionalIpRangesConfig */ + desiredAdditionalIpRangesConfig?: (google.container.v1.IDesiredAdditionalIPRangesConfig|null); + /** ClusterUpdate desiredEnterpriseConfig */ desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); + /** ClusterUpdate desiredAutoIpamConfig */ + desiredAutoIpamConfig?: (google.container.v1.IAutoIpamConfig|null); + /** ClusterUpdate desiredDisableL4LbFirewallReconciliation */ desiredDisableL4LbFirewallReconciliation?: (boolean|null); /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig */ desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + /** ClusterUpdate desiredUserManagedKeysConfig */ + desiredUserManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + /** ClusterUpdate desiredAnonymousAuthenticationConfig */ desiredAnonymousAuthenticationConfig?: (google.container.v1.IAnonymousAuthenticationConfig|null); + + /** ClusterUpdate gkeAutoUpgradeConfig */ + gkeAutoUpgradeConfig?: (google.container.v1.IGkeAutoUpgradeConfig|null); } /** Represents a ClusterUpdate. */ @@ -9167,18 +9787,30 @@ export namespace google { /** ClusterUpdate desiredRbacBindingConfig. */ public desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + /** ClusterUpdate desiredAdditionalIpRangesConfig. */ + public desiredAdditionalIpRangesConfig?: (google.container.v1.IDesiredAdditionalIPRangesConfig|null); + /** ClusterUpdate desiredEnterpriseConfig. */ public desiredEnterpriseConfig?: (google.container.v1.IDesiredEnterpriseConfig|null); + /** ClusterUpdate desiredAutoIpamConfig. */ + public desiredAutoIpamConfig?: (google.container.v1.IAutoIpamConfig|null); + /** ClusterUpdate desiredDisableL4LbFirewallReconciliation. */ public desiredDisableL4LbFirewallReconciliation?: (boolean|null); /** ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig. */ public desiredNodePoolAutoConfigLinuxNodeConfig?: (google.container.v1.ILinuxNodeConfig|null); + /** ClusterUpdate desiredUserManagedKeysConfig. */ + public desiredUserManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + /** ClusterUpdate desiredAnonymousAuthenticationConfig. */ public desiredAnonymousAuthenticationConfig?: (google.container.v1.IAnonymousAuthenticationConfig|null); + /** ClusterUpdate gkeAutoUpgradeConfig. */ + public gkeAutoUpgradeConfig?: (google.container.v1.IGkeAutoUpgradeConfig|null); + /** * Creates a new ClusterUpdate instance using the specified properties. * @param [properties] Properties to set @@ -9360,6 +9992,297 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an AdditionalIPRangesConfig. */ + interface IAdditionalIPRangesConfig { + + /** AdditionalIPRangesConfig subnetwork */ + subnetwork?: (string|null); + + /** AdditionalIPRangesConfig podIpv4RangeNames */ + podIpv4RangeNames?: (string[]|null); + } + + /** Represents an AdditionalIPRangesConfig. */ + class AdditionalIPRangesConfig implements IAdditionalIPRangesConfig { + + /** + * Constructs a new AdditionalIPRangesConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAdditionalIPRangesConfig); + + /** AdditionalIPRangesConfig subnetwork. */ + public subnetwork: string; + + /** AdditionalIPRangesConfig podIpv4RangeNames. */ + public podIpv4RangeNames: string[]; + + /** + * Creates a new AdditionalIPRangesConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AdditionalIPRangesConfig instance + */ + public static create(properties?: google.container.v1.IAdditionalIPRangesConfig): google.container.v1.AdditionalIPRangesConfig; + + /** + * Encodes the specified AdditionalIPRangesConfig message. Does not implicitly {@link google.container.v1.AdditionalIPRangesConfig.verify|verify} messages. + * @param message AdditionalIPRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAdditionalIPRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdditionalIPRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalIPRangesConfig.verify|verify} messages. + * @param message AdditionalIPRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAdditionalIPRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdditionalIPRangesConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdditionalIPRangesConfig + * @throws {Error} If the payload is not 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.AdditionalIPRangesConfig; + + /** + * Decodes an AdditionalIPRangesConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdditionalIPRangesConfig + * @throws {Error} If the payload 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.AdditionalIPRangesConfig; + + /** + * Verifies an AdditionalIPRangesConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdditionalIPRangesConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdditionalIPRangesConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AdditionalIPRangesConfig; + + /** + * Creates a plain object from an AdditionalIPRangesConfig message. Also converts values to other types if specified. + * @param message AdditionalIPRangesConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AdditionalIPRangesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdditionalIPRangesConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdditionalIPRangesConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DesiredAdditionalIPRangesConfig. */ + interface IDesiredAdditionalIPRangesConfig { + + /** DesiredAdditionalIPRangesConfig additionalIpRangesConfigs */ + additionalIpRangesConfigs?: (google.container.v1.IAdditionalIPRangesConfig[]|null); + } + + /** Represents a DesiredAdditionalIPRangesConfig. */ + class DesiredAdditionalIPRangesConfig implements IDesiredAdditionalIPRangesConfig { + + /** + * Constructs a new DesiredAdditionalIPRangesConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDesiredAdditionalIPRangesConfig); + + /** DesiredAdditionalIPRangesConfig additionalIpRangesConfigs. */ + public additionalIpRangesConfigs: google.container.v1.IAdditionalIPRangesConfig[]; + + /** + * Creates a new DesiredAdditionalIPRangesConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DesiredAdditionalIPRangesConfig instance + */ + public static create(properties?: google.container.v1.IDesiredAdditionalIPRangesConfig): google.container.v1.DesiredAdditionalIPRangesConfig; + + /** + * Encodes the specified DesiredAdditionalIPRangesConfig message. Does not implicitly {@link google.container.v1.DesiredAdditionalIPRangesConfig.verify|verify} messages. + * @param message DesiredAdditionalIPRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDesiredAdditionalIPRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DesiredAdditionalIPRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredAdditionalIPRangesConfig.verify|verify} messages. + * @param message DesiredAdditionalIPRangesConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDesiredAdditionalIPRangesConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DesiredAdditionalIPRangesConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DesiredAdditionalIPRangesConfig + * @throws {Error} If the payload is not 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.DesiredAdditionalIPRangesConfig; + + /** + * Decodes a DesiredAdditionalIPRangesConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DesiredAdditionalIPRangesConfig + * @throws {Error} If the payload 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.DesiredAdditionalIPRangesConfig; + + /** + * Verifies a DesiredAdditionalIPRangesConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DesiredAdditionalIPRangesConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DesiredAdditionalIPRangesConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DesiredAdditionalIPRangesConfig; + + /** + * Creates a plain object from a DesiredAdditionalIPRangesConfig message. Also converts values to other types if specified. + * @param message DesiredAdditionalIPRangesConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DesiredAdditionalIPRangesConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DesiredAdditionalIPRangesConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DesiredAdditionalIPRangesConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AutoIpamConfig. */ + interface IAutoIpamConfig { + } + + /** Represents an AutoIpamConfig. */ + class AutoIpamConfig implements IAutoIpamConfig { + + /** + * Constructs a new AutoIpamConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IAutoIpamConfig); + + /** + * Creates a new AutoIpamConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoIpamConfig instance + */ + public static create(properties?: google.container.v1.IAutoIpamConfig): google.container.v1.AutoIpamConfig; + + /** + * Encodes the specified AutoIpamConfig message. Does not implicitly {@link google.container.v1.AutoIpamConfig.verify|verify} messages. + * @param message AutoIpamConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IAutoIpamConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoIpamConfig message, length delimited. Does not implicitly {@link google.container.v1.AutoIpamConfig.verify|verify} messages. + * @param message AutoIpamConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IAutoIpamConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoIpamConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoIpamConfig + * @throws {Error} If the payload is not 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.AutoIpamConfig; + + /** + * Decodes an AutoIpamConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoIpamConfig + * @throws {Error} If the payload 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.AutoIpamConfig; + + /** + * Verifies an AutoIpamConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutoIpamConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoIpamConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.AutoIpamConfig; + + /** + * Creates a plain object from an AutoIpamConfig message. Also converts values to other types if specified. + * @param message AutoIpamConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.AutoIpamConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoIpamConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoIpamConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a RangeInfo. */ interface IRangeInfo { @@ -10467,6 +11390,9 @@ export namespace google { /** UpdateNodePoolRequest flexStart */ flexStart?: (boolean|null); + + /** UpdateNodePoolRequest bootDisk */ + bootDisk?: (google.container.v1.IBootDisk|null); } /** Represents an UpdateNodePoolRequest. */ @@ -10580,6 +11506,9 @@ export namespace google { /** UpdateNodePoolRequest flexStart. */ public flexStart?: (boolean|null); + /** UpdateNodePoolRequest bootDisk. */ + public bootDisk?: (google.container.v1.IBootDisk|null); + /** * Creates a new UpdateNodePoolRequest instance using the specified properties. * @param [properties] Properties to set @@ -15694,6 +16623,9 @@ export namespace google { /** ClusterAutoscaling autoprovisioningLocations */ autoprovisioningLocations?: (string[]|null); + + /** ClusterAutoscaling defaultComputeClassConfig */ + defaultComputeClassConfig?: (google.container.v1.IDefaultComputeClassConfig|null); } /** Represents a ClusterAutoscaling. */ @@ -15720,6 +16652,9 @@ export namespace google { /** ClusterAutoscaling autoprovisioningLocations. */ public autoprovisioningLocations: string[]; + /** ClusterAutoscaling defaultComputeClassConfig. */ + public defaultComputeClassConfig?: (google.container.v1.IDefaultComputeClassConfig|null); + /** * Creates a new ClusterAutoscaling instance using the specified properties. * @param [properties] Properties to set @@ -16074,6 +17009,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DefaultComputeClassConfig. */ + interface IDefaultComputeClassConfig { + + /** DefaultComputeClassConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a DefaultComputeClassConfig. */ + class DefaultComputeClassConfig implements IDefaultComputeClassConfig { + + /** + * Constructs a new DefaultComputeClassConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IDefaultComputeClassConfig); + + /** DefaultComputeClassConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new DefaultComputeClassConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DefaultComputeClassConfig instance + */ + public static create(properties?: google.container.v1.IDefaultComputeClassConfig): google.container.v1.DefaultComputeClassConfig; + + /** + * Encodes the specified DefaultComputeClassConfig message. Does not implicitly {@link google.container.v1.DefaultComputeClassConfig.verify|verify} messages. + * @param message DefaultComputeClassConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IDefaultComputeClassConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DefaultComputeClassConfig message, length delimited. Does not implicitly {@link google.container.v1.DefaultComputeClassConfig.verify|verify} messages. + * @param message DefaultComputeClassConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IDefaultComputeClassConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DefaultComputeClassConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DefaultComputeClassConfig + * @throws {Error} If the payload is not 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.DefaultComputeClassConfig; + + /** + * Decodes a DefaultComputeClassConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DefaultComputeClassConfig + * @throws {Error} If the payload 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.DefaultComputeClassConfig; + + /** + * Verifies a DefaultComputeClassConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DefaultComputeClassConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DefaultComputeClassConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.DefaultComputeClassConfig; + + /** + * Creates a plain object from a DefaultComputeClassConfig message. Also converts values to other types if specified. + * @param message DefaultComputeClassConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.DefaultComputeClassConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DefaultComputeClassConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DefaultComputeClassConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a NodePoolAutoscaling. */ interface INodePoolAutoscaling { @@ -17512,7 +18544,8 @@ export namespace google { SET_BY_OPERATOR = 4, CLOUD_KMS_KEY_ERROR = 7, CA_EXPIRING = 9, - NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS = 10 + NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS = 10, + CLOUD_KMS_KEY_DESTROYED = 11 } } @@ -24844,6 +25877,121 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a BootDisk. */ + interface IBootDisk { + + /** BootDisk diskType */ + diskType?: (string|null); + + /** BootDisk sizeGb */ + sizeGb?: (number|Long|string|null); + + /** BootDisk provisionedIops */ + provisionedIops?: (number|Long|string|null); + + /** BootDisk provisionedThroughput */ + provisionedThroughput?: (number|Long|string|null); + } + + /** Represents a BootDisk. */ + class BootDisk implements IBootDisk { + + /** + * Constructs a new BootDisk. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IBootDisk); + + /** BootDisk diskType. */ + public diskType: string; + + /** BootDisk sizeGb. */ + public sizeGb: (number|Long|string); + + /** BootDisk provisionedIops. */ + public provisionedIops: (number|Long|string); + + /** BootDisk provisionedThroughput. */ + public provisionedThroughput: (number|Long|string); + + /** + * Creates a new BootDisk instance using the specified properties. + * @param [properties] Properties to set + * @returns BootDisk instance + */ + public static create(properties?: google.container.v1.IBootDisk): google.container.v1.BootDisk; + + /** + * Encodes the specified BootDisk message. Does not implicitly {@link google.container.v1.BootDisk.verify|verify} messages. + * @param message BootDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BootDisk message, length delimited. Does not implicitly {@link google.container.v1.BootDisk.verify|verify} messages. + * @param message BootDisk message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IBootDisk, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BootDisk message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BootDisk + * @throws {Error} If the payload is not 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.BootDisk; + + /** + * Decodes a BootDisk message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BootDisk + * @throws {Error} If the payload 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.BootDisk; + + /** + * Verifies a BootDisk message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BootDisk message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BootDisk + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.BootDisk; + + /** + * Creates a plain object from a BootDisk message. Also converts values to other types if specified. + * @param message BootDisk + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.BootDisk, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BootDisk to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BootDisk + * @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 { @@ -25713,6 +26861,112 @@ export namespace google { SYSTEM_CONFIG = 4 } } + + /** Properties of a GkeAutoUpgradeConfig. */ + interface IGkeAutoUpgradeConfig { + + /** GkeAutoUpgradeConfig patchMode */ + patchMode?: (google.container.v1.GkeAutoUpgradeConfig.PatchMode|keyof typeof google.container.v1.GkeAutoUpgradeConfig.PatchMode|null); + } + + /** Represents a GkeAutoUpgradeConfig. */ + class GkeAutoUpgradeConfig implements IGkeAutoUpgradeConfig { + + /** + * Constructs a new GkeAutoUpgradeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IGkeAutoUpgradeConfig); + + /** GkeAutoUpgradeConfig patchMode. */ + public patchMode: (google.container.v1.GkeAutoUpgradeConfig.PatchMode|keyof typeof google.container.v1.GkeAutoUpgradeConfig.PatchMode); + + /** + * Creates a new GkeAutoUpgradeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns GkeAutoUpgradeConfig instance + */ + public static create(properties?: google.container.v1.IGkeAutoUpgradeConfig): google.container.v1.GkeAutoUpgradeConfig; + + /** + * Encodes the specified GkeAutoUpgradeConfig message. Does not implicitly {@link google.container.v1.GkeAutoUpgradeConfig.verify|verify} messages. + * @param message GkeAutoUpgradeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IGkeAutoUpgradeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GkeAutoUpgradeConfig message, length delimited. Does not implicitly {@link google.container.v1.GkeAutoUpgradeConfig.verify|verify} messages. + * @param message GkeAutoUpgradeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IGkeAutoUpgradeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GkeAutoUpgradeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GkeAutoUpgradeConfig + * @throws {Error} If the payload is not 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.GkeAutoUpgradeConfig; + + /** + * Decodes a GkeAutoUpgradeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GkeAutoUpgradeConfig + * @throws {Error} If the payload 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.GkeAutoUpgradeConfig; + + /** + * Verifies a GkeAutoUpgradeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GkeAutoUpgradeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GkeAutoUpgradeConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.GkeAutoUpgradeConfig; + + /** + * Creates a plain object from a GkeAutoUpgradeConfig message. Also converts values to other types if specified. + * @param message GkeAutoUpgradeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.GkeAutoUpgradeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GkeAutoUpgradeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GkeAutoUpgradeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GkeAutoUpgradeConfig { + + /** PatchMode enum. */ + enum PatchMode { + PATCH_MODE_UNSPECIFIED = 0, + ACCELERATED = 1 + } + } } /** Namespace v1beta1. */ @@ -54433,6 +55687,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -54450,6 +55707,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -55150,6 +56410,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -55164,6 +56427,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -55242,6 +56508,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -55568,6 +56946,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -55582,6 +56963,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -55906,6 +57290,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -56287,6 +57774,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -56317,6 +57805,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -56366,6 +57857,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -56500,6 +57994,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -56541,6 +58038,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -57388,6 +58888,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -57414,6 +58917,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -58348,6 +59854,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -58403,6 +59912,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -58623,6 +60135,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -58861,6 +60488,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -58883,6 +60513,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -59472,6 +61105,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -59501,6 +61140,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -59623,6 +61268,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -59742,8 +61497,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -59758,8 +61516,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -60292,6 +62053,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Duration. */ interface IDuration { diff --git a/packages/google-container/protos/protos.js b/packages/google-container/protos/protos.js index fc8b16ff01d9..c7557d65a146 100644 --- a/packages/google-container/protos/protos.js +++ b/packages/google-container/protos/protos.js @@ -1289,6 +1289,8 @@ * @property {Object.|null} [sysctls] LinuxNodeConfig sysctls * @property {google.container.v1.LinuxNodeConfig.CgroupMode|null} [cgroupMode] LinuxNodeConfig cgroupMode * @property {google.container.v1.LinuxNodeConfig.IHugepagesConfig|null} [hugepages] LinuxNodeConfig hugepages + * @property {google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled|null} [transparentHugepageEnabled] LinuxNodeConfig transparentHugepageEnabled + * @property {google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag|null} [transparentHugepageDefrag] LinuxNodeConfig transparentHugepageDefrag */ /** @@ -1331,6 +1333,22 @@ */ LinuxNodeConfig.prototype.hugepages = null; + /** + * LinuxNodeConfig transparentHugepageEnabled. + * @member {google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled} transparentHugepageEnabled + * @memberof google.container.v1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.transparentHugepageEnabled = 0; + + /** + * LinuxNodeConfig transparentHugepageDefrag. + * @member {google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag} transparentHugepageDefrag + * @memberof google.container.v1.LinuxNodeConfig + * @instance + */ + LinuxNodeConfig.prototype.transparentHugepageDefrag = 0; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -1371,6 +1389,10 @@ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cgroupMode); if (message.hugepages != null && Object.hasOwnProperty.call(message, "hugepages")) $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.encode(message.hugepages, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.transparentHugepageEnabled != null && Object.hasOwnProperty.call(message, "transparentHugepageEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.transparentHugepageEnabled); + if (message.transparentHugepageDefrag != null && Object.hasOwnProperty.call(message, "transparentHugepageDefrag")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.transparentHugepageDefrag); return writer; }; @@ -1438,6 +1460,14 @@ message.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.decode(reader, reader.uint32()); break; } + case 4: { + message.transparentHugepageEnabled = reader.int32(); + break; + } + case 5: { + message.transparentHugepageDefrag = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1499,6 +1529,28 @@ return "hugepages." + error; } } + if (message.transparentHugepageEnabled != null && message.hasOwnProperty("transparentHugepageEnabled")) + switch (message.transparentHugepageEnabled) { + default: + return "transparentHugepageEnabled: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.transparentHugepageDefrag != null && message.hasOwnProperty("transparentHugepageDefrag")) + switch (message.transparentHugepageDefrag) { + default: + return "transparentHugepageDefrag: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; @@ -1546,6 +1598,62 @@ throw TypeError(".google.container.v1.LinuxNodeConfig.hugepages: object expected"); message.hugepages = $root.google.container.v1.LinuxNodeConfig.HugepagesConfig.fromObject(object.hugepages); } + switch (object.transparentHugepageEnabled) { + default: + if (typeof object.transparentHugepageEnabled === "number") { + message.transparentHugepageEnabled = object.transparentHugepageEnabled; + break; + } + break; + case "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED": + case 0: + message.transparentHugepageEnabled = 0; + break; + case "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS": + case 1: + message.transparentHugepageEnabled = 1; + break; + case "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE": + case 2: + message.transparentHugepageEnabled = 2; + break; + case "TRANSPARENT_HUGEPAGE_ENABLED_NEVER": + case 3: + message.transparentHugepageEnabled = 3; + break; + } + switch (object.transparentHugepageDefrag) { + default: + if (typeof object.transparentHugepageDefrag === "number") { + message.transparentHugepageDefrag = object.transparentHugepageDefrag; + break; + } + break; + case "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED": + case 0: + message.transparentHugepageDefrag = 0; + break; + case "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS": + case 1: + message.transparentHugepageDefrag = 1; + break; + case "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER": + case 2: + message.transparentHugepageDefrag = 2; + break; + case "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE": + case 3: + message.transparentHugepageDefrag = 3; + break; + case "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE": + case 4: + message.transparentHugepageDefrag = 4; + break; + case "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER": + case 5: + message.transparentHugepageDefrag = 5; + break; + } return message; }; @@ -1564,8 +1672,11 @@ var object = {}; if (options.objects || options.defaults) object.sysctls = {}; - if (options.defaults) + if (options.defaults) { object.cgroupMode = options.enums === String ? "CGROUP_MODE_UNSPECIFIED" : 0; + object.transparentHugepageEnabled = options.enums === String ? "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED" : 0; + object.transparentHugepageDefrag = options.enums === String ? "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED" : 0; + } var keys2; if (message.sysctls && (keys2 = Object.keys(message.sysctls)).length) { object.sysctls = {}; @@ -1579,6 +1690,10 @@ if (options.oneofs) object._hugepages = "hugepages"; } + if (message.transparentHugepageEnabled != null && message.hasOwnProperty("transparentHugepageEnabled")) + object.transparentHugepageEnabled = options.enums === String ? $root.google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled[message.transparentHugepageEnabled] === undefined ? message.transparentHugepageEnabled : $root.google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled[message.transparentHugepageEnabled] : message.transparentHugepageEnabled; + if (message.transparentHugepageDefrag != null && message.hasOwnProperty("transparentHugepageDefrag")) + object.transparentHugepageDefrag = options.enums === String ? $root.google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag[message.transparentHugepageDefrag] === undefined ? message.transparentHugepageDefrag : $root.google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag[message.transparentHugepageDefrag] : message.transparentHugepageDefrag; return object; }; @@ -1875,6 +1990,46 @@ return HugepagesConfig; })(); + /** + * TransparentHugepageEnabled enum. + * @name google.container.v1.LinuxNodeConfig.TransparentHugepageEnabled + * @enum {number} + * @property {number} TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED=0 TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED value + * @property {number} TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS=1 TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS value + * @property {number} TRANSPARENT_HUGEPAGE_ENABLED_MADVISE=2 TRANSPARENT_HUGEPAGE_ENABLED_MADVISE value + * @property {number} TRANSPARENT_HUGEPAGE_ENABLED_NEVER=3 TRANSPARENT_HUGEPAGE_ENABLED_NEVER value + */ + LinuxNodeConfig.TransparentHugepageEnabled = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS"] = 1; + values[valuesById[2] = "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE"] = 2; + values[valuesById[3] = "TRANSPARENT_HUGEPAGE_ENABLED_NEVER"] = 3; + return values; + })(); + + /** + * TransparentHugepageDefrag enum. + * @name google.container.v1.LinuxNodeConfig.TransparentHugepageDefrag + * @enum {number} + * @property {number} TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED=0 TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED value + * @property {number} TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS=1 TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS value + * @property {number} TRANSPARENT_HUGEPAGE_DEFRAG_DEFER=2 TRANSPARENT_HUGEPAGE_DEFRAG_DEFER value + * @property {number} TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE=3 TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE value + * @property {number} TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE=4 TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE value + * @property {number} TRANSPARENT_HUGEPAGE_DEFRAG_NEVER=5 TRANSPARENT_HUGEPAGE_DEFRAG_NEVER value + */ + LinuxNodeConfig.TransparentHugepageDefrag = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED"] = 0; + values[valuesById[1] = "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS"] = 1; + values[valuesById[2] = "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER"] = 2; + values[valuesById[3] = "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE"] = 3; + values[valuesById[4] = "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE"] = 4; + values[valuesById[5] = "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER"] = 5; + return values; + })(); + return LinuxNodeConfig; })(); @@ -2143,6 +2298,12 @@ * @property {string|null} [containerLogMaxSize] NodeKubeletConfig containerLogMaxSize * @property {number|null} [containerLogMaxFiles] NodeKubeletConfig containerLogMaxFiles * @property {Array.|null} [allowedUnsafeSysctls] NodeKubeletConfig allowedUnsafeSysctls + * @property {google.container.v1.IEvictionSignals|null} [evictionSoft] NodeKubeletConfig evictionSoft + * @property {google.container.v1.IEvictionGracePeriod|null} [evictionSoftGracePeriod] NodeKubeletConfig evictionSoftGracePeriod + * @property {google.container.v1.IEvictionMinimumReclaim|null} [evictionMinimumReclaim] NodeKubeletConfig evictionMinimumReclaim + * @property {number|null} [evictionMaxPodGracePeriodSeconds] NodeKubeletConfig evictionMaxPodGracePeriodSeconds + * @property {number|null} [maxParallelImagePulls] NodeKubeletConfig maxParallelImagePulls + * @property {boolean|null} [singleProcessOomKill] NodeKubeletConfig singleProcessOomKill */ /** @@ -2273,6 +2434,54 @@ */ NodeKubeletConfig.prototype.allowedUnsafeSysctls = $util.emptyArray; + /** + * NodeKubeletConfig evictionSoft. + * @member {google.container.v1.IEvictionSignals|null|undefined} evictionSoft + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.evictionSoft = null; + + /** + * NodeKubeletConfig evictionSoftGracePeriod. + * @member {google.container.v1.IEvictionGracePeriod|null|undefined} evictionSoftGracePeriod + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.evictionSoftGracePeriod = null; + + /** + * NodeKubeletConfig evictionMinimumReclaim. + * @member {google.container.v1.IEvictionMinimumReclaim|null|undefined} evictionMinimumReclaim + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.evictionMinimumReclaim = null; + + /** + * NodeKubeletConfig evictionMaxPodGracePeriodSeconds. + * @member {number} evictionMaxPodGracePeriodSeconds + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.evictionMaxPodGracePeriodSeconds = 0; + + /** + * NodeKubeletConfig maxParallelImagePulls. + * @member {number} maxParallelImagePulls + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.maxParallelImagePulls = 0; + + /** + * NodeKubeletConfig singleProcessOomKill. + * @member {boolean|null|undefined} singleProcessOomKill + * @memberof google.container.v1.NodeKubeletConfig + * @instance + */ + NodeKubeletConfig.prototype.singleProcessOomKill = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2282,6 +2491,12 @@ set: $util.oneOfSetter($oneOfFields) }); + // Virtual OneOf for proto3 optional field + Object.defineProperty(NodeKubeletConfig.prototype, "_singleProcessOomKill", { + get: $util.oneOfGetter($oneOfFields = ["singleProcessOomKill"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new NodeKubeletConfig instance using the specified properties. * @function create @@ -2335,6 +2550,18 @@ if (message.allowedUnsafeSysctls != null && message.allowedUnsafeSysctls.length) for (var i = 0; i < message.allowedUnsafeSysctls.length; ++i) writer.uint32(/* id 16, wireType 2 =*/130).string(message.allowedUnsafeSysctls[i]); + if (message.evictionSoft != null && Object.hasOwnProperty.call(message, "evictionSoft")) + $root.google.container.v1.EvictionSignals.encode(message.evictionSoft, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.evictionSoftGracePeriod != null && Object.hasOwnProperty.call(message, "evictionSoftGracePeriod")) + $root.google.container.v1.EvictionGracePeriod.encode(message.evictionSoftGracePeriod, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.evictionMinimumReclaim != null && Object.hasOwnProperty.call(message, "evictionMinimumReclaim")) + $root.google.container.v1.EvictionMinimumReclaim.encode(message.evictionMinimumReclaim, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.evictionMaxPodGracePeriodSeconds != null && Object.hasOwnProperty.call(message, "evictionMaxPodGracePeriodSeconds")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.evictionMaxPodGracePeriodSeconds); + if (message.maxParallelImagePulls != null && Object.hasOwnProperty.call(message, "maxParallelImagePulls")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.maxParallelImagePulls); + if (message.singleProcessOomKill != null && Object.hasOwnProperty.call(message, "singleProcessOomKill")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.singleProcessOomKill); return writer; }; @@ -2429,6 +2656,30 @@ message.allowedUnsafeSysctls.push(reader.string()); break; } + case 17: { + message.evictionSoft = $root.google.container.v1.EvictionSignals.decode(reader, reader.uint32()); + break; + } + case 18: { + message.evictionSoftGracePeriod = $root.google.container.v1.EvictionGracePeriod.decode(reader, reader.uint32()); + break; + } + case 19: { + message.evictionMinimumReclaim = $root.google.container.v1.EvictionMinimumReclaim.decode(reader, reader.uint32()); + break; + } + case 20: { + message.evictionMaxPodGracePeriodSeconds = reader.int32(); + break; + } + case 21: { + message.maxParallelImagePulls = reader.int32(); + break; + } + case 22: { + message.singleProcessOomKill = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -2519,6 +2770,32 @@ if (!$util.isString(message.allowedUnsafeSysctls[i])) return "allowedUnsafeSysctls: string[] expected"; } + if (message.evictionSoft != null && message.hasOwnProperty("evictionSoft")) { + var error = $root.google.container.v1.EvictionSignals.verify(message.evictionSoft); + if (error) + return "evictionSoft." + error; + } + if (message.evictionSoftGracePeriod != null && message.hasOwnProperty("evictionSoftGracePeriod")) { + var error = $root.google.container.v1.EvictionGracePeriod.verify(message.evictionSoftGracePeriod); + if (error) + return "evictionSoftGracePeriod." + error; + } + if (message.evictionMinimumReclaim != null && message.hasOwnProperty("evictionMinimumReclaim")) { + var error = $root.google.container.v1.EvictionMinimumReclaim.verify(message.evictionMinimumReclaim); + if (error) + return "evictionMinimumReclaim." + error; + } + if (message.evictionMaxPodGracePeriodSeconds != null && message.hasOwnProperty("evictionMaxPodGracePeriodSeconds")) + if (!$util.isInteger(message.evictionMaxPodGracePeriodSeconds)) + return "evictionMaxPodGracePeriodSeconds: integer expected"; + if (message.maxParallelImagePulls != null && message.hasOwnProperty("maxParallelImagePulls")) + if (!$util.isInteger(message.maxParallelImagePulls)) + return "maxParallelImagePulls: integer expected"; + if (message.singleProcessOomKill != null && message.hasOwnProperty("singleProcessOomKill")) { + properties._singleProcessOomKill = 1; + if (typeof message.singleProcessOomKill !== "boolean") + return "singleProcessOomKill: boolean expected"; + } return null; }; @@ -2583,6 +2860,27 @@ for (var i = 0; i < object.allowedUnsafeSysctls.length; ++i) message.allowedUnsafeSysctls[i] = String(object.allowedUnsafeSysctls[i]); } + if (object.evictionSoft != null) { + if (typeof object.evictionSoft !== "object") + throw TypeError(".google.container.v1.NodeKubeletConfig.evictionSoft: object expected"); + message.evictionSoft = $root.google.container.v1.EvictionSignals.fromObject(object.evictionSoft); + } + if (object.evictionSoftGracePeriod != null) { + if (typeof object.evictionSoftGracePeriod !== "object") + throw TypeError(".google.container.v1.NodeKubeletConfig.evictionSoftGracePeriod: object expected"); + message.evictionSoftGracePeriod = $root.google.container.v1.EvictionGracePeriod.fromObject(object.evictionSoftGracePeriod); + } + if (object.evictionMinimumReclaim != null) { + if (typeof object.evictionMinimumReclaim !== "object") + throw TypeError(".google.container.v1.NodeKubeletConfig.evictionMinimumReclaim: object expected"); + message.evictionMinimumReclaim = $root.google.container.v1.EvictionMinimumReclaim.fromObject(object.evictionMinimumReclaim); + } + if (object.evictionMaxPodGracePeriodSeconds != null) + message.evictionMaxPodGracePeriodSeconds = object.evictionMaxPodGracePeriodSeconds | 0; + if (object.maxParallelImagePulls != null) + message.maxParallelImagePulls = object.maxParallelImagePulls | 0; + if (object.singleProcessOomKill != null) + message.singleProcessOomKill = Boolean(object.singleProcessOomKill); return message; }; @@ -2618,6 +2916,11 @@ object.imageMaximumGcAge = ""; object.containerLogMaxSize = ""; object.containerLogMaxFiles = 0; + object.evictionSoft = null; + object.evictionSoftGracePeriod = null; + object.evictionMinimumReclaim = null; + object.evictionMaxPodGracePeriodSeconds = 0; + object.maxParallelImagePulls = 0; } if (message.cpuManagerPolicy != null && message.hasOwnProperty("cpuManagerPolicy")) object.cpuManagerPolicy = message.cpuManagerPolicy; @@ -2656,6 +2959,21 @@ for (var j = 0; j < message.allowedUnsafeSysctls.length; ++j) object.allowedUnsafeSysctls[j] = message.allowedUnsafeSysctls[j]; } + if (message.evictionSoft != null && message.hasOwnProperty("evictionSoft")) + object.evictionSoft = $root.google.container.v1.EvictionSignals.toObject(message.evictionSoft, options); + if (message.evictionSoftGracePeriod != null && message.hasOwnProperty("evictionSoftGracePeriod")) + object.evictionSoftGracePeriod = $root.google.container.v1.EvictionGracePeriod.toObject(message.evictionSoftGracePeriod, options); + if (message.evictionMinimumReclaim != null && message.hasOwnProperty("evictionMinimumReclaim")) + object.evictionMinimumReclaim = $root.google.container.v1.EvictionMinimumReclaim.toObject(message.evictionMinimumReclaim, options); + if (message.evictionMaxPodGracePeriodSeconds != null && message.hasOwnProperty("evictionMaxPodGracePeriodSeconds")) + object.evictionMaxPodGracePeriodSeconds = message.evictionMaxPodGracePeriodSeconds; + if (message.maxParallelImagePulls != null && message.hasOwnProperty("maxParallelImagePulls")) + object.maxParallelImagePulls = message.maxParallelImagePulls; + if (message.singleProcessOomKill != null && message.hasOwnProperty("singleProcessOomKill")) { + object.singleProcessOomKill = message.singleProcessOomKill; + if (options.oneofs) + object._singleProcessOomKill = "singleProcessOomKill"; + } return object; }; @@ -3122,6 +3440,969 @@ return MemoryManager; })(); + v1.EvictionSignals = (function() { + + /** + * Properties of an EvictionSignals. + * @memberof google.container.v1 + * @interface IEvictionSignals + * @property {string|null} [memoryAvailable] EvictionSignals memoryAvailable + * @property {string|null} [nodefsAvailable] EvictionSignals nodefsAvailable + * @property {string|null} [nodefsInodesFree] EvictionSignals nodefsInodesFree + * @property {string|null} [imagefsAvailable] EvictionSignals imagefsAvailable + * @property {string|null} [imagefsInodesFree] EvictionSignals imagefsInodesFree + * @property {string|null} [pidAvailable] EvictionSignals pidAvailable + */ + + /** + * Constructs a new EvictionSignals. + * @memberof google.container.v1 + * @classdesc Represents an EvictionSignals. + * @implements IEvictionSignals + * @constructor + * @param {google.container.v1.IEvictionSignals=} [properties] Properties to set + */ + function EvictionSignals(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvictionSignals memoryAvailable. + * @member {string} memoryAvailable + * @memberof google.container.v1.EvictionSignals + * @instance + */ + EvictionSignals.prototype.memoryAvailable = ""; + + /** + * EvictionSignals nodefsAvailable. + * @member {string} nodefsAvailable + * @memberof google.container.v1.EvictionSignals + * @instance + */ + EvictionSignals.prototype.nodefsAvailable = ""; + + /** + * EvictionSignals nodefsInodesFree. + * @member {string} nodefsInodesFree + * @memberof google.container.v1.EvictionSignals + * @instance + */ + EvictionSignals.prototype.nodefsInodesFree = ""; + + /** + * EvictionSignals imagefsAvailable. + * @member {string} imagefsAvailable + * @memberof google.container.v1.EvictionSignals + * @instance + */ + EvictionSignals.prototype.imagefsAvailable = ""; + + /** + * EvictionSignals imagefsInodesFree. + * @member {string} imagefsInodesFree + * @memberof google.container.v1.EvictionSignals + * @instance + */ + EvictionSignals.prototype.imagefsInodesFree = ""; + + /** + * EvictionSignals pidAvailable. + * @member {string} pidAvailable + * @memberof google.container.v1.EvictionSignals + * @instance + */ + EvictionSignals.prototype.pidAvailable = ""; + + /** + * Creates a new EvictionSignals instance using the specified properties. + * @function create + * @memberof google.container.v1.EvictionSignals + * @static + * @param {google.container.v1.IEvictionSignals=} [properties] Properties to set + * @returns {google.container.v1.EvictionSignals} EvictionSignals instance + */ + EvictionSignals.create = function create(properties) { + return new EvictionSignals(properties); + }; + + /** + * Encodes the specified EvictionSignals message. Does not implicitly {@link google.container.v1.EvictionSignals.verify|verify} messages. + * @function encode + * @memberof google.container.v1.EvictionSignals + * @static + * @param {google.container.v1.IEvictionSignals} message EvictionSignals message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictionSignals.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.memoryAvailable != null && Object.hasOwnProperty.call(message, "memoryAvailable")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.memoryAvailable); + if (message.nodefsAvailable != null && Object.hasOwnProperty.call(message, "nodefsAvailable")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nodefsAvailable); + if (message.nodefsInodesFree != null && Object.hasOwnProperty.call(message, "nodefsInodesFree")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nodefsInodesFree); + if (message.imagefsAvailable != null && Object.hasOwnProperty.call(message, "imagefsAvailable")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.imagefsAvailable); + if (message.imagefsInodesFree != null && Object.hasOwnProperty.call(message, "imagefsInodesFree")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imagefsInodesFree); + if (message.pidAvailable != null && Object.hasOwnProperty.call(message, "pidAvailable")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pidAvailable); + return writer; + }; + + /** + * Encodes the specified EvictionSignals message, length delimited. Does not implicitly {@link google.container.v1.EvictionSignals.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.EvictionSignals + * @static + * @param {google.container.v1.IEvictionSignals} message EvictionSignals message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictionSignals.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvictionSignals message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.EvictionSignals + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.EvictionSignals} EvictionSignals + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictionSignals.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.EvictionSignals(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.memoryAvailable = reader.string(); + break; + } + case 2: { + message.nodefsAvailable = reader.string(); + break; + } + case 3: { + message.nodefsInodesFree = reader.string(); + break; + } + case 4: { + message.imagefsAvailable = reader.string(); + break; + } + case 5: { + message.imagefsInodesFree = reader.string(); + break; + } + case 6: { + message.pidAvailable = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvictionSignals message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.EvictionSignals + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.EvictionSignals} EvictionSignals + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictionSignals.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvictionSignals message. + * @function verify + * @memberof google.container.v1.EvictionSignals + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvictionSignals.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.memoryAvailable != null && message.hasOwnProperty("memoryAvailable")) + if (!$util.isString(message.memoryAvailable)) + return "memoryAvailable: string expected"; + if (message.nodefsAvailable != null && message.hasOwnProperty("nodefsAvailable")) + if (!$util.isString(message.nodefsAvailable)) + return "nodefsAvailable: string expected"; + if (message.nodefsInodesFree != null && message.hasOwnProperty("nodefsInodesFree")) + if (!$util.isString(message.nodefsInodesFree)) + return "nodefsInodesFree: string expected"; + if (message.imagefsAvailable != null && message.hasOwnProperty("imagefsAvailable")) + if (!$util.isString(message.imagefsAvailable)) + return "imagefsAvailable: string expected"; + if (message.imagefsInodesFree != null && message.hasOwnProperty("imagefsInodesFree")) + if (!$util.isString(message.imagefsInodesFree)) + return "imagefsInodesFree: string expected"; + if (message.pidAvailable != null && message.hasOwnProperty("pidAvailable")) + if (!$util.isString(message.pidAvailable)) + return "pidAvailable: string expected"; + return null; + }; + + /** + * Creates an EvictionSignals message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.EvictionSignals + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.EvictionSignals} EvictionSignals + */ + EvictionSignals.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.EvictionSignals) + return object; + var message = new $root.google.container.v1.EvictionSignals(); + if (object.memoryAvailable != null) + message.memoryAvailable = String(object.memoryAvailable); + if (object.nodefsAvailable != null) + message.nodefsAvailable = String(object.nodefsAvailable); + if (object.nodefsInodesFree != null) + message.nodefsInodesFree = String(object.nodefsInodesFree); + if (object.imagefsAvailable != null) + message.imagefsAvailable = String(object.imagefsAvailable); + if (object.imagefsInodesFree != null) + message.imagefsInodesFree = String(object.imagefsInodesFree); + if (object.pidAvailable != null) + message.pidAvailable = String(object.pidAvailable); + return message; + }; + + /** + * Creates a plain object from an EvictionSignals message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.EvictionSignals + * @static + * @param {google.container.v1.EvictionSignals} message EvictionSignals + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvictionSignals.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.memoryAvailable = ""; + object.nodefsAvailable = ""; + object.nodefsInodesFree = ""; + object.imagefsAvailable = ""; + object.imagefsInodesFree = ""; + object.pidAvailable = ""; + } + if (message.memoryAvailable != null && message.hasOwnProperty("memoryAvailable")) + object.memoryAvailable = message.memoryAvailable; + if (message.nodefsAvailable != null && message.hasOwnProperty("nodefsAvailable")) + object.nodefsAvailable = message.nodefsAvailable; + if (message.nodefsInodesFree != null && message.hasOwnProperty("nodefsInodesFree")) + object.nodefsInodesFree = message.nodefsInodesFree; + if (message.imagefsAvailable != null && message.hasOwnProperty("imagefsAvailable")) + object.imagefsAvailable = message.imagefsAvailable; + if (message.imagefsInodesFree != null && message.hasOwnProperty("imagefsInodesFree")) + object.imagefsInodesFree = message.imagefsInodesFree; + if (message.pidAvailable != null && message.hasOwnProperty("pidAvailable")) + object.pidAvailable = message.pidAvailable; + return object; + }; + + /** + * Converts this EvictionSignals to JSON. + * @function toJSON + * @memberof google.container.v1.EvictionSignals + * @instance + * @returns {Object.} JSON object + */ + EvictionSignals.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvictionSignals + * @function getTypeUrl + * @memberof google.container.v1.EvictionSignals + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvictionSignals.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.EvictionSignals"; + }; + + return EvictionSignals; + })(); + + v1.EvictionGracePeriod = (function() { + + /** + * Properties of an EvictionGracePeriod. + * @memberof google.container.v1 + * @interface IEvictionGracePeriod + * @property {string|null} [memoryAvailable] EvictionGracePeriod memoryAvailable + * @property {string|null} [nodefsAvailable] EvictionGracePeriod nodefsAvailable + * @property {string|null} [nodefsInodesFree] EvictionGracePeriod nodefsInodesFree + * @property {string|null} [imagefsAvailable] EvictionGracePeriod imagefsAvailable + * @property {string|null} [imagefsInodesFree] EvictionGracePeriod imagefsInodesFree + * @property {string|null} [pidAvailable] EvictionGracePeriod pidAvailable + */ + + /** + * Constructs a new EvictionGracePeriod. + * @memberof google.container.v1 + * @classdesc Represents an EvictionGracePeriod. + * @implements IEvictionGracePeriod + * @constructor + * @param {google.container.v1.IEvictionGracePeriod=} [properties] Properties to set + */ + function EvictionGracePeriod(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvictionGracePeriod memoryAvailable. + * @member {string} memoryAvailable + * @memberof google.container.v1.EvictionGracePeriod + * @instance + */ + EvictionGracePeriod.prototype.memoryAvailable = ""; + + /** + * EvictionGracePeriod nodefsAvailable. + * @member {string} nodefsAvailable + * @memberof google.container.v1.EvictionGracePeriod + * @instance + */ + EvictionGracePeriod.prototype.nodefsAvailable = ""; + + /** + * EvictionGracePeriod nodefsInodesFree. + * @member {string} nodefsInodesFree + * @memberof google.container.v1.EvictionGracePeriod + * @instance + */ + EvictionGracePeriod.prototype.nodefsInodesFree = ""; + + /** + * EvictionGracePeriod imagefsAvailable. + * @member {string} imagefsAvailable + * @memberof google.container.v1.EvictionGracePeriod + * @instance + */ + EvictionGracePeriod.prototype.imagefsAvailable = ""; + + /** + * EvictionGracePeriod imagefsInodesFree. + * @member {string} imagefsInodesFree + * @memberof google.container.v1.EvictionGracePeriod + * @instance + */ + EvictionGracePeriod.prototype.imagefsInodesFree = ""; + + /** + * EvictionGracePeriod pidAvailable. + * @member {string} pidAvailable + * @memberof google.container.v1.EvictionGracePeriod + * @instance + */ + EvictionGracePeriod.prototype.pidAvailable = ""; + + /** + * Creates a new EvictionGracePeriod instance using the specified properties. + * @function create + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {google.container.v1.IEvictionGracePeriod=} [properties] Properties to set + * @returns {google.container.v1.EvictionGracePeriod} EvictionGracePeriod instance + */ + EvictionGracePeriod.create = function create(properties) { + return new EvictionGracePeriod(properties); + }; + + /** + * Encodes the specified EvictionGracePeriod message. Does not implicitly {@link google.container.v1.EvictionGracePeriod.verify|verify} messages. + * @function encode + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {google.container.v1.IEvictionGracePeriod} message EvictionGracePeriod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictionGracePeriod.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.memoryAvailable != null && Object.hasOwnProperty.call(message, "memoryAvailable")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.memoryAvailable); + if (message.nodefsAvailable != null && Object.hasOwnProperty.call(message, "nodefsAvailable")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nodefsAvailable); + if (message.nodefsInodesFree != null && Object.hasOwnProperty.call(message, "nodefsInodesFree")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nodefsInodesFree); + if (message.imagefsAvailable != null && Object.hasOwnProperty.call(message, "imagefsAvailable")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.imagefsAvailable); + if (message.imagefsInodesFree != null && Object.hasOwnProperty.call(message, "imagefsInodesFree")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imagefsInodesFree); + if (message.pidAvailable != null && Object.hasOwnProperty.call(message, "pidAvailable")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pidAvailable); + return writer; + }; + + /** + * Encodes the specified EvictionGracePeriod message, length delimited. Does not implicitly {@link google.container.v1.EvictionGracePeriod.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {google.container.v1.IEvictionGracePeriod} message EvictionGracePeriod message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictionGracePeriod.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvictionGracePeriod message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.EvictionGracePeriod} EvictionGracePeriod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictionGracePeriod.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.EvictionGracePeriod(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.memoryAvailable = reader.string(); + break; + } + case 2: { + message.nodefsAvailable = reader.string(); + break; + } + case 3: { + message.nodefsInodesFree = reader.string(); + break; + } + case 4: { + message.imagefsAvailable = reader.string(); + break; + } + case 5: { + message.imagefsInodesFree = reader.string(); + break; + } + case 6: { + message.pidAvailable = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvictionGracePeriod message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.EvictionGracePeriod} EvictionGracePeriod + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictionGracePeriod.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvictionGracePeriod message. + * @function verify + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvictionGracePeriod.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.memoryAvailable != null && message.hasOwnProperty("memoryAvailable")) + if (!$util.isString(message.memoryAvailable)) + return "memoryAvailable: string expected"; + if (message.nodefsAvailable != null && message.hasOwnProperty("nodefsAvailable")) + if (!$util.isString(message.nodefsAvailable)) + return "nodefsAvailable: string expected"; + if (message.nodefsInodesFree != null && message.hasOwnProperty("nodefsInodesFree")) + if (!$util.isString(message.nodefsInodesFree)) + return "nodefsInodesFree: string expected"; + if (message.imagefsAvailable != null && message.hasOwnProperty("imagefsAvailable")) + if (!$util.isString(message.imagefsAvailable)) + return "imagefsAvailable: string expected"; + if (message.imagefsInodesFree != null && message.hasOwnProperty("imagefsInodesFree")) + if (!$util.isString(message.imagefsInodesFree)) + return "imagefsInodesFree: string expected"; + if (message.pidAvailable != null && message.hasOwnProperty("pidAvailable")) + if (!$util.isString(message.pidAvailable)) + return "pidAvailable: string expected"; + return null; + }; + + /** + * Creates an EvictionGracePeriod message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.EvictionGracePeriod} EvictionGracePeriod + */ + EvictionGracePeriod.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.EvictionGracePeriod) + return object; + var message = new $root.google.container.v1.EvictionGracePeriod(); + if (object.memoryAvailable != null) + message.memoryAvailable = String(object.memoryAvailable); + if (object.nodefsAvailable != null) + message.nodefsAvailable = String(object.nodefsAvailable); + if (object.nodefsInodesFree != null) + message.nodefsInodesFree = String(object.nodefsInodesFree); + if (object.imagefsAvailable != null) + message.imagefsAvailable = String(object.imagefsAvailable); + if (object.imagefsInodesFree != null) + message.imagefsInodesFree = String(object.imagefsInodesFree); + if (object.pidAvailable != null) + message.pidAvailable = String(object.pidAvailable); + return message; + }; + + /** + * Creates a plain object from an EvictionGracePeriod message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {google.container.v1.EvictionGracePeriod} message EvictionGracePeriod + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvictionGracePeriod.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.memoryAvailable = ""; + object.nodefsAvailable = ""; + object.nodefsInodesFree = ""; + object.imagefsAvailable = ""; + object.imagefsInodesFree = ""; + object.pidAvailable = ""; + } + if (message.memoryAvailable != null && message.hasOwnProperty("memoryAvailable")) + object.memoryAvailable = message.memoryAvailable; + if (message.nodefsAvailable != null && message.hasOwnProperty("nodefsAvailable")) + object.nodefsAvailable = message.nodefsAvailable; + if (message.nodefsInodesFree != null && message.hasOwnProperty("nodefsInodesFree")) + object.nodefsInodesFree = message.nodefsInodesFree; + if (message.imagefsAvailable != null && message.hasOwnProperty("imagefsAvailable")) + object.imagefsAvailable = message.imagefsAvailable; + if (message.imagefsInodesFree != null && message.hasOwnProperty("imagefsInodesFree")) + object.imagefsInodesFree = message.imagefsInodesFree; + if (message.pidAvailable != null && message.hasOwnProperty("pidAvailable")) + object.pidAvailable = message.pidAvailable; + return object; + }; + + /** + * Converts this EvictionGracePeriod to JSON. + * @function toJSON + * @memberof google.container.v1.EvictionGracePeriod + * @instance + * @returns {Object.} JSON object + */ + EvictionGracePeriod.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvictionGracePeriod + * @function getTypeUrl + * @memberof google.container.v1.EvictionGracePeriod + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvictionGracePeriod.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.EvictionGracePeriod"; + }; + + return EvictionGracePeriod; + })(); + + v1.EvictionMinimumReclaim = (function() { + + /** + * Properties of an EvictionMinimumReclaim. + * @memberof google.container.v1 + * @interface IEvictionMinimumReclaim + * @property {string|null} [memoryAvailable] EvictionMinimumReclaim memoryAvailable + * @property {string|null} [nodefsAvailable] EvictionMinimumReclaim nodefsAvailable + * @property {string|null} [nodefsInodesFree] EvictionMinimumReclaim nodefsInodesFree + * @property {string|null} [imagefsAvailable] EvictionMinimumReclaim imagefsAvailable + * @property {string|null} [imagefsInodesFree] EvictionMinimumReclaim imagefsInodesFree + * @property {string|null} [pidAvailable] EvictionMinimumReclaim pidAvailable + */ + + /** + * Constructs a new EvictionMinimumReclaim. + * @memberof google.container.v1 + * @classdesc Represents an EvictionMinimumReclaim. + * @implements IEvictionMinimumReclaim + * @constructor + * @param {google.container.v1.IEvictionMinimumReclaim=} [properties] Properties to set + */ + function EvictionMinimumReclaim(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvictionMinimumReclaim memoryAvailable. + * @member {string} memoryAvailable + * @memberof google.container.v1.EvictionMinimumReclaim + * @instance + */ + EvictionMinimumReclaim.prototype.memoryAvailable = ""; + + /** + * EvictionMinimumReclaim nodefsAvailable. + * @member {string} nodefsAvailable + * @memberof google.container.v1.EvictionMinimumReclaim + * @instance + */ + EvictionMinimumReclaim.prototype.nodefsAvailable = ""; + + /** + * EvictionMinimumReclaim nodefsInodesFree. + * @member {string} nodefsInodesFree + * @memberof google.container.v1.EvictionMinimumReclaim + * @instance + */ + EvictionMinimumReclaim.prototype.nodefsInodesFree = ""; + + /** + * EvictionMinimumReclaim imagefsAvailable. + * @member {string} imagefsAvailable + * @memberof google.container.v1.EvictionMinimumReclaim + * @instance + */ + EvictionMinimumReclaim.prototype.imagefsAvailable = ""; + + /** + * EvictionMinimumReclaim imagefsInodesFree. + * @member {string} imagefsInodesFree + * @memberof google.container.v1.EvictionMinimumReclaim + * @instance + */ + EvictionMinimumReclaim.prototype.imagefsInodesFree = ""; + + /** + * EvictionMinimumReclaim pidAvailable. + * @member {string} pidAvailable + * @memberof google.container.v1.EvictionMinimumReclaim + * @instance + */ + EvictionMinimumReclaim.prototype.pidAvailable = ""; + + /** + * Creates a new EvictionMinimumReclaim instance using the specified properties. + * @function create + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {google.container.v1.IEvictionMinimumReclaim=} [properties] Properties to set + * @returns {google.container.v1.EvictionMinimumReclaim} EvictionMinimumReclaim instance + */ + EvictionMinimumReclaim.create = function create(properties) { + return new EvictionMinimumReclaim(properties); + }; + + /** + * Encodes the specified EvictionMinimumReclaim message. Does not implicitly {@link google.container.v1.EvictionMinimumReclaim.verify|verify} messages. + * @function encode + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {google.container.v1.IEvictionMinimumReclaim} message EvictionMinimumReclaim message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictionMinimumReclaim.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.memoryAvailable != null && Object.hasOwnProperty.call(message, "memoryAvailable")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.memoryAvailable); + if (message.nodefsAvailable != null && Object.hasOwnProperty.call(message, "nodefsAvailable")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nodefsAvailable); + if (message.nodefsInodesFree != null && Object.hasOwnProperty.call(message, "nodefsInodesFree")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nodefsInodesFree); + if (message.imagefsAvailable != null && Object.hasOwnProperty.call(message, "imagefsAvailable")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.imagefsAvailable); + if (message.imagefsInodesFree != null && Object.hasOwnProperty.call(message, "imagefsInodesFree")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imagefsInodesFree); + if (message.pidAvailable != null && Object.hasOwnProperty.call(message, "pidAvailable")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pidAvailable); + return writer; + }; + + /** + * Encodes the specified EvictionMinimumReclaim message, length delimited. Does not implicitly {@link google.container.v1.EvictionMinimumReclaim.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {google.container.v1.IEvictionMinimumReclaim} message EvictionMinimumReclaim message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvictionMinimumReclaim.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvictionMinimumReclaim message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.EvictionMinimumReclaim} EvictionMinimumReclaim + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictionMinimumReclaim.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.EvictionMinimumReclaim(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.memoryAvailable = reader.string(); + break; + } + case 2: { + message.nodefsAvailable = reader.string(); + break; + } + case 3: { + message.nodefsInodesFree = reader.string(); + break; + } + case 4: { + message.imagefsAvailable = reader.string(); + break; + } + case 5: { + message.imagefsInodesFree = reader.string(); + break; + } + case 6: { + message.pidAvailable = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvictionMinimumReclaim message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.EvictionMinimumReclaim} EvictionMinimumReclaim + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvictionMinimumReclaim.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvictionMinimumReclaim message. + * @function verify + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvictionMinimumReclaim.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.memoryAvailable != null && message.hasOwnProperty("memoryAvailable")) + if (!$util.isString(message.memoryAvailable)) + return "memoryAvailable: string expected"; + if (message.nodefsAvailable != null && message.hasOwnProperty("nodefsAvailable")) + if (!$util.isString(message.nodefsAvailable)) + return "nodefsAvailable: string expected"; + if (message.nodefsInodesFree != null && message.hasOwnProperty("nodefsInodesFree")) + if (!$util.isString(message.nodefsInodesFree)) + return "nodefsInodesFree: string expected"; + if (message.imagefsAvailable != null && message.hasOwnProperty("imagefsAvailable")) + if (!$util.isString(message.imagefsAvailable)) + return "imagefsAvailable: string expected"; + if (message.imagefsInodesFree != null && message.hasOwnProperty("imagefsInodesFree")) + if (!$util.isString(message.imagefsInodesFree)) + return "imagefsInodesFree: string expected"; + if (message.pidAvailable != null && message.hasOwnProperty("pidAvailable")) + if (!$util.isString(message.pidAvailable)) + return "pidAvailable: string expected"; + return null; + }; + + /** + * Creates an EvictionMinimumReclaim message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.EvictionMinimumReclaim} EvictionMinimumReclaim + */ + EvictionMinimumReclaim.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.EvictionMinimumReclaim) + return object; + var message = new $root.google.container.v1.EvictionMinimumReclaim(); + if (object.memoryAvailable != null) + message.memoryAvailable = String(object.memoryAvailable); + if (object.nodefsAvailable != null) + message.nodefsAvailable = String(object.nodefsAvailable); + if (object.nodefsInodesFree != null) + message.nodefsInodesFree = String(object.nodefsInodesFree); + if (object.imagefsAvailable != null) + message.imagefsAvailable = String(object.imagefsAvailable); + if (object.imagefsInodesFree != null) + message.imagefsInodesFree = String(object.imagefsInodesFree); + if (object.pidAvailable != null) + message.pidAvailable = String(object.pidAvailable); + return message; + }; + + /** + * Creates a plain object from an EvictionMinimumReclaim message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {google.container.v1.EvictionMinimumReclaim} message EvictionMinimumReclaim + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvictionMinimumReclaim.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.memoryAvailable = ""; + object.nodefsAvailable = ""; + object.nodefsInodesFree = ""; + object.imagefsAvailable = ""; + object.imagefsInodesFree = ""; + object.pidAvailable = ""; + } + if (message.memoryAvailable != null && message.hasOwnProperty("memoryAvailable")) + object.memoryAvailable = message.memoryAvailable; + if (message.nodefsAvailable != null && message.hasOwnProperty("nodefsAvailable")) + object.nodefsAvailable = message.nodefsAvailable; + if (message.nodefsInodesFree != null && message.hasOwnProperty("nodefsInodesFree")) + object.nodefsInodesFree = message.nodefsInodesFree; + if (message.imagefsAvailable != null && message.hasOwnProperty("imagefsAvailable")) + object.imagefsAvailable = message.imagefsAvailable; + if (message.imagefsInodesFree != null && message.hasOwnProperty("imagefsInodesFree")) + object.imagefsInodesFree = message.imagefsInodesFree; + if (message.pidAvailable != null && message.hasOwnProperty("pidAvailable")) + object.pidAvailable = message.pidAvailable; + return object; + }; + + /** + * Converts this EvictionMinimumReclaim to JSON. + * @function toJSON + * @memberof google.container.v1.EvictionMinimumReclaim + * @instance + * @returns {Object.} JSON object + */ + EvictionMinimumReclaim.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EvictionMinimumReclaim + * @function getTypeUrl + * @memberof google.container.v1.EvictionMinimumReclaim + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EvictionMinimumReclaim.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.EvictionMinimumReclaim"; + }; + + return EvictionMinimumReclaim; + })(); + v1.NodeConfig = (function() { /** @@ -3172,6 +4453,7 @@ * @property {google.container.v1.NodeConfig.LocalSsdEncryptionMode|null} [localSsdEncryptionMode] NodeConfig localSsdEncryptionMode * @property {google.container.v1.NodeConfig.EffectiveCgroupMode|null} [effectiveCgroupMode] NodeConfig effectiveCgroupMode * @property {boolean|null} [flexStart] NodeConfig flexStart + * @property {google.container.v1.IBootDisk|null} [bootDisk] NodeConfig bootDisk */ /** @@ -3550,6 +4832,14 @@ */ NodeConfig.prototype.flexStart = null; + /** + * NodeConfig bootDisk. + * @member {google.container.v1.IBootDisk|null|undefined} bootDisk + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.bootDisk = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -3698,6 +4988,8 @@ writer.uint32(/* id 55, wireType 0 =*/440).int32(message.effectiveCgroupMode); if (message.flexStart != null && Object.hasOwnProperty.call(message, "flexStart")) writer.uint32(/* id 56, wireType 0 =*/448).bool(message.flexStart); + if (message.bootDisk != null && Object.hasOwnProperty.call(message, "bootDisk")) + $root.google.container.v1.BootDisk.encode(message.bootDisk, writer.uint32(/* id 57, wireType 2 =*/458).fork()).ldelim(); return writer; }; @@ -3979,6 +5271,10 @@ message.flexStart = reader.bool(); break; } + case 57: { + message.bootDisk = $root.google.container.v1.BootDisk.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4254,6 +5550,11 @@ if (typeof message.flexStart !== "boolean") return "flexStart: boolean expected"; } + if (message.bootDisk != null && message.hasOwnProperty("bootDisk")) { + var error = $root.google.container.v1.BootDisk.verify(message.bootDisk); + if (error) + return "bootDisk." + error; + } return null; }; @@ -4507,6 +5808,11 @@ } if (object.flexStart != null) message.flexStart = Boolean(object.flexStart); + if (object.bootDisk != null) { + if (typeof object.bootDisk !== "object") + throw TypeError(".google.container.v1.NodeConfig.bootDisk: object expected"); + message.bootDisk = $root.google.container.v1.BootDisk.fromObject(object.bootDisk); + } return message; }; @@ -4568,6 +5874,7 @@ object.enableConfidentialStorage = false; object.maxRunDuration = null; object.effectiveCgroupMode = options.enums === String ? "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" : 0; + object.bootDisk = null; } if (message.machineType != null && message.hasOwnProperty("machineType")) object.machineType = message.machineType; @@ -4697,6 +6004,8 @@ if (options.oneofs) object._flexStart = "flexStart"; } + if (message.bootDisk != null && message.hasOwnProperty("bootDisk")) + object.bootDisk = $root.google.container.v1.BootDisk.toObject(message.bootDisk, options); return object; }; @@ -5117,6 +6426,7 @@ * @property {Array.|null} [additionalNodeNetworkConfigs] NodeNetworkConfig additionalNodeNetworkConfigs * @property {Array.|null} [additionalPodNetworkConfigs] NodeNetworkConfig additionalPodNetworkConfigs * @property {number|null} [podIpv4RangeUtilization] NodeNetworkConfig podIpv4RangeUtilization + * @property {string|null} [subnetwork] NodeNetworkConfig subnetwork */ /** @@ -5208,6 +6518,14 @@ */ NodeNetworkConfig.prototype.podIpv4RangeUtilization = 0; + /** + * NodeNetworkConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1.NodeNetworkConfig + * @instance + */ + NodeNetworkConfig.prototype.subnetwork = ""; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -5267,6 +6585,8 @@ $root.google.container.v1.AdditionalPodNetworkConfig.encode(message.additionalPodNetworkConfigs[i], writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); if (message.podIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "podIpv4RangeUtilization")) writer.uint32(/* id 16, wireType 1 =*/129).double(message.podIpv4RangeUtilization); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.subnetwork); return writer; }; @@ -5343,6 +6663,10 @@ message.podIpv4RangeUtilization = reader.double(); break; } + case 19: { + message.subnetwork = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -5427,6 +6751,9 @@ if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) if (typeof message.podIpv4RangeUtilization !== "number") return "podIpv4RangeUtilization: number expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; return null; }; @@ -5482,6 +6809,8 @@ } if (object.podIpv4RangeUtilization != null) message.podIpv4RangeUtilization = Number(object.podIpv4RangeUtilization); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); return message; }; @@ -5508,6 +6837,7 @@ object.podIpv4CidrBlock = ""; object.podCidrOverprovisionConfig = null; object.podIpv4RangeUtilization = 0; + object.subnetwork = ""; } if (message.createPodRange != null && message.hasOwnProperty("createPodRange")) object.createPodRange = message.createPodRange; @@ -5539,6 +6869,8 @@ } if (message.podIpv4RangeUtilization != null && message.hasOwnProperty("podIpv4RangeUtilization")) object.podIpv4RangeUtilization = options.json && !isFinite(message.podIpv4RangeUtilization) ? String(message.podIpv4RangeUtilization) : message.podIpv4RangeUtilization; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; return object; }; @@ -7318,6 +8650,7 @@ * @memberof google.container.v1 * @interface ISoleTenantConfig * @property {Array.|null} [nodeAffinities] SoleTenantConfig nodeAffinities + * @property {number|null} [minNodeCpus] SoleTenantConfig minNodeCpus */ /** @@ -7344,6 +8677,23 @@ */ SoleTenantConfig.prototype.nodeAffinities = $util.emptyArray; + /** + * SoleTenantConfig minNodeCpus. + * @member {number|null|undefined} minNodeCpus + * @memberof google.container.v1.SoleTenantConfig + * @instance + */ + SoleTenantConfig.prototype.minNodeCpus = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(SoleTenantConfig.prototype, "_minNodeCpus", { + get: $util.oneOfGetter($oneOfFields = ["minNodeCpus"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new SoleTenantConfig instance using the specified properties. * @function create @@ -7371,6 +8721,8 @@ if (message.nodeAffinities != null && message.nodeAffinities.length) for (var i = 0; i < message.nodeAffinities.length; ++i) $root.google.container.v1.SoleTenantConfig.NodeAffinity.encode(message.nodeAffinities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minNodeCpus != null && Object.hasOwnProperty.call(message, "minNodeCpus")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minNodeCpus); return writer; }; @@ -7413,6 +8765,10 @@ message.nodeAffinities.push($root.google.container.v1.SoleTenantConfig.NodeAffinity.decode(reader, reader.uint32())); break; } + case 2: { + message.minNodeCpus = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -7448,6 +8804,7 @@ SoleTenantConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.nodeAffinities != null && message.hasOwnProperty("nodeAffinities")) { if (!Array.isArray(message.nodeAffinities)) return "nodeAffinities: array expected"; @@ -7457,6 +8814,11 @@ return "nodeAffinities." + error; } } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + properties._minNodeCpus = 1; + if (!$util.isInteger(message.minNodeCpus)) + return "minNodeCpus: integer expected"; + } return null; }; @@ -7482,6 +8844,8 @@ message.nodeAffinities[i] = $root.google.container.v1.SoleTenantConfig.NodeAffinity.fromObject(object.nodeAffinities[i]); } } + if (object.minNodeCpus != null) + message.minNodeCpus = object.minNodeCpus | 0; return message; }; @@ -7505,6 +8869,11 @@ for (var j = 0; j < message.nodeAffinities.length; ++j) object.nodeAffinities[j] = $root.google.container.v1.SoleTenantConfig.NodeAffinity.toObject(message.nodeAffinities[j], options); } + if (message.minNodeCpus != null && message.hasOwnProperty("minNodeCpus")) { + object.minNodeCpus = message.minNodeCpus; + if (options.oneofs) + object._minNodeCpus = "minNodeCpus"; + } return object; }; @@ -10558,6 +11927,7 @@ * @property {google.container.v1.IParallelstoreCsiDriverConfig|null} [parallelstoreCsiDriverConfig] AddonsConfig parallelstoreCsiDriverConfig * @property {google.container.v1.IRayOperatorConfig|null} [rayOperatorConfig] AddonsConfig rayOperatorConfig * @property {google.container.v1.IHighScaleCheckpointingConfig|null} [highScaleCheckpointingConfig] AddonsConfig highScaleCheckpointingConfig + * @property {google.container.v1.ILustreCsiDriverConfig|null} [lustreCsiDriverConfig] AddonsConfig lustreCsiDriverConfig */ /** @@ -10695,6 +12065,14 @@ */ AddonsConfig.prototype.highScaleCheckpointingConfig = null; + /** + * AddonsConfig lustreCsiDriverConfig. + * @member {google.container.v1.ILustreCsiDriverConfig|null|undefined} lustreCsiDriverConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.lustreCsiDriverConfig = null; + /** * Creates a new AddonsConfig instance using the specified properties. * @function create @@ -10749,6 +12127,8 @@ $root.google.container.v1.RayOperatorConfig.encode(message.rayOperatorConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); if (message.highScaleCheckpointingConfig != null && Object.hasOwnProperty.call(message, "highScaleCheckpointingConfig")) $root.google.container.v1.HighScaleCheckpointingConfig.encode(message.highScaleCheckpointingConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.lustreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "lustreCsiDriverConfig")) + $root.google.container.v1.LustreCsiDriverConfig.encode(message.lustreCsiDriverConfig, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); return writer; }; @@ -10845,6 +12225,10 @@ message.highScaleCheckpointingConfig = $root.google.container.v1.HighScaleCheckpointingConfig.decode(reader, reader.uint32()); break; } + case 23: { + message.lustreCsiDriverConfig = $root.google.container.v1.LustreCsiDriverConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -10955,6 +12339,11 @@ if (error) return "highScaleCheckpointingConfig." + error; } + if (message.lustreCsiDriverConfig != null && message.hasOwnProperty("lustreCsiDriverConfig")) { + var error = $root.google.container.v1.LustreCsiDriverConfig.verify(message.lustreCsiDriverConfig); + if (error) + return "lustreCsiDriverConfig." + error; + } return null; }; @@ -11045,6 +12434,11 @@ throw TypeError(".google.container.v1.AddonsConfig.highScaleCheckpointingConfig: object expected"); message.highScaleCheckpointingConfig = $root.google.container.v1.HighScaleCheckpointingConfig.fromObject(object.highScaleCheckpointingConfig); } + if (object.lustreCsiDriverConfig != null) { + if (typeof object.lustreCsiDriverConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.lustreCsiDriverConfig: object expected"); + message.lustreCsiDriverConfig = $root.google.container.v1.LustreCsiDriverConfig.fromObject(object.lustreCsiDriverConfig); + } return message; }; @@ -11077,6 +12471,7 @@ object.parallelstoreCsiDriverConfig = null; object.rayOperatorConfig = null; object.highScaleCheckpointingConfig = null; + object.lustreCsiDriverConfig = null; } if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) object.httpLoadBalancing = $root.google.container.v1.HttpLoadBalancing.toObject(message.httpLoadBalancing, options); @@ -11108,6 +12503,8 @@ object.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.toObject(message.rayOperatorConfig, options); if (message.highScaleCheckpointingConfig != null && message.hasOwnProperty("highScaleCheckpointingConfig")) object.highScaleCheckpointingConfig = $root.google.container.v1.HighScaleCheckpointingConfig.toObject(message.highScaleCheckpointingConfig, options); + if (message.lustreCsiDriverConfig != null && message.hasOwnProperty("lustreCsiDriverConfig")) + object.lustreCsiDriverConfig = $root.google.container.v1.LustreCsiDriverConfig.toObject(message.lustreCsiDriverConfig, options); return object; }; @@ -14470,6 +15867,235 @@ return HighScaleCheckpointingConfig; })(); + v1.LustreCsiDriverConfig = (function() { + + /** + * Properties of a LustreCsiDriverConfig. + * @memberof google.container.v1 + * @interface ILustreCsiDriverConfig + * @property {boolean|null} [enabled] LustreCsiDriverConfig enabled + * @property {boolean|null} [enableLegacyLustrePort] LustreCsiDriverConfig enableLegacyLustrePort + */ + + /** + * Constructs a new LustreCsiDriverConfig. + * @memberof google.container.v1 + * @classdesc Represents a LustreCsiDriverConfig. + * @implements ILustreCsiDriverConfig + * @constructor + * @param {google.container.v1.ILustreCsiDriverConfig=} [properties] Properties to set + */ + function LustreCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LustreCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.LustreCsiDriverConfig + * @instance + */ + LustreCsiDriverConfig.prototype.enabled = false; + + /** + * LustreCsiDriverConfig enableLegacyLustrePort. + * @member {boolean} enableLegacyLustrePort + * @memberof google.container.v1.LustreCsiDriverConfig + * @instance + */ + LustreCsiDriverConfig.prototype.enableLegacyLustrePort = false; + + /** + * Creates a new LustreCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {google.container.v1.ILustreCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1.LustreCsiDriverConfig} LustreCsiDriverConfig instance + */ + LustreCsiDriverConfig.create = function create(properties) { + return new LustreCsiDriverConfig(properties); + }; + + /** + * Encodes the specified LustreCsiDriverConfig message. Does not implicitly {@link google.container.v1.LustreCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {google.container.v1.ILustreCsiDriverConfig} message LustreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LustreCsiDriverConfig.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.enableLegacyLustrePort != null && Object.hasOwnProperty.call(message, "enableLegacyLustrePort")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enableLegacyLustrePort); + return writer; + }; + + /** + * Encodes the specified LustreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.LustreCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {google.container.v1.ILustreCsiDriverConfig} message LustreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LustreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LustreCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.LustreCsiDriverConfig} LustreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LustreCsiDriverConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.LustreCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 3: { + message.enableLegacyLustrePort = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LustreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.LustreCsiDriverConfig} LustreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LustreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LustreCsiDriverConfig message. + * @function verify + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LustreCsiDriverConfig.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.enableLegacyLustrePort != null && message.hasOwnProperty("enableLegacyLustrePort")) + if (typeof message.enableLegacyLustrePort !== "boolean") + return "enableLegacyLustrePort: boolean expected"; + return null; + }; + + /** + * Creates a LustreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.LustreCsiDriverConfig} LustreCsiDriverConfig + */ + LustreCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.LustreCsiDriverConfig) + return object; + var message = new $root.google.container.v1.LustreCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.enableLegacyLustrePort != null) + message.enableLegacyLustrePort = Boolean(object.enableLegacyLustrePort); + return message; + }; + + /** + * Creates a plain object from a LustreCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {google.container.v1.LustreCsiDriverConfig} message LustreCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LustreCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.enableLegacyLustrePort = false; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.enableLegacyLustrePort != null && message.hasOwnProperty("enableLegacyLustrePort")) + object.enableLegacyLustrePort = message.enableLegacyLustrePort; + return object; + }; + + /** + * Converts this LustreCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1.LustreCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + LustreCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LustreCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1.LustreCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LustreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.LustreCsiDriverConfig"; + }; + + return LustreCsiDriverConfig; + })(); + v1.RayOperatorConfig = (function() { /** @@ -16658,6 +18284,8 @@ * @property {string|null} [servicesIpv6CidrBlock] IPAllocationPolicy servicesIpv6CidrBlock * @property {google.container.v1.IAdditionalPodRangesConfig|null} [additionalPodRangesConfig] IPAllocationPolicy additionalPodRangesConfig * @property {number|null} [defaultPodIpv4RangeUtilization] IPAllocationPolicy defaultPodIpv4RangeUtilization + * @property {Array.|null} [additionalIpRangesConfigs] IPAllocationPolicy additionalIpRangesConfigs + * @property {google.container.v1.IAutoIpamConfig|null} [autoIpamConfig] IPAllocationPolicy autoIpamConfig */ /** @@ -16669,6 +18297,7 @@ * @param {google.container.v1.IIPAllocationPolicy=} [properties] Properties to set */ function IPAllocationPolicy(properties) { + this.additionalIpRangesConfigs = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16835,6 +18464,22 @@ */ IPAllocationPolicy.prototype.defaultPodIpv4RangeUtilization = 0; + /** + * IPAllocationPolicy additionalIpRangesConfigs. + * @member {Array.} additionalIpRangesConfigs + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.additionalIpRangesConfigs = $util.emptyArray; + + /** + * IPAllocationPolicy autoIpamConfig. + * @member {google.container.v1.IAutoIpamConfig|null|undefined} autoIpamConfig + * @memberof google.container.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.autoIpamConfig = null; + /** * Creates a new IPAllocationPolicy instance using the specified properties. * @function create @@ -16899,6 +18544,11 @@ $root.google.container.v1.AdditionalPodRangesConfig.encode(message.additionalPodRangesConfig, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); if (message.defaultPodIpv4RangeUtilization != null && Object.hasOwnProperty.call(message, "defaultPodIpv4RangeUtilization")) writer.uint32(/* id 25, wireType 1 =*/201).double(message.defaultPodIpv4RangeUtilization); + if (message.additionalIpRangesConfigs != null && message.additionalIpRangesConfigs.length) + for (var i = 0; i < message.additionalIpRangesConfigs.length; ++i) + $root.google.container.v1.AdditionalIPRangesConfig.encode(message.additionalIpRangesConfigs[i], writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.autoIpamConfig != null && Object.hasOwnProperty.call(message, "autoIpamConfig")) + $root.google.container.v1.AutoIpamConfig.encode(message.autoIpamConfig, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); return writer; }; @@ -17015,6 +18665,16 @@ message.defaultPodIpv4RangeUtilization = reader.double(); break; } + case 29: { + if (!(message.additionalIpRangesConfigs && message.additionalIpRangesConfigs.length)) + message.additionalIpRangesConfigs = []; + message.additionalIpRangesConfigs.push($root.google.container.v1.AdditionalIPRangesConfig.decode(reader, reader.uint32())); + break; + } + case 30: { + message.autoIpamConfig = $root.google.container.v1.AutoIpamConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17126,6 +18786,20 @@ if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) if (typeof message.defaultPodIpv4RangeUtilization !== "number") return "defaultPodIpv4RangeUtilization: number expected"; + if (message.additionalIpRangesConfigs != null && message.hasOwnProperty("additionalIpRangesConfigs")) { + if (!Array.isArray(message.additionalIpRangesConfigs)) + return "additionalIpRangesConfigs: array expected"; + for (var i = 0; i < message.additionalIpRangesConfigs.length; ++i) { + var error = $root.google.container.v1.AdditionalIPRangesConfig.verify(message.additionalIpRangesConfigs[i]); + if (error) + return "additionalIpRangesConfigs." + error; + } + } + if (message.autoIpamConfig != null && message.hasOwnProperty("autoIpamConfig")) { + var error = $root.google.container.v1.AutoIpamConfig.verify(message.autoIpamConfig); + if (error) + return "autoIpamConfig." + error; + } return null; }; @@ -17223,6 +18897,21 @@ } if (object.defaultPodIpv4RangeUtilization != null) message.defaultPodIpv4RangeUtilization = Number(object.defaultPodIpv4RangeUtilization); + if (object.additionalIpRangesConfigs) { + if (!Array.isArray(object.additionalIpRangesConfigs)) + throw TypeError(".google.container.v1.IPAllocationPolicy.additionalIpRangesConfigs: array expected"); + message.additionalIpRangesConfigs = []; + for (var i = 0; i < object.additionalIpRangesConfigs.length; ++i) { + if (typeof object.additionalIpRangesConfigs[i] !== "object") + throw TypeError(".google.container.v1.IPAllocationPolicy.additionalIpRangesConfigs: object expected"); + message.additionalIpRangesConfigs[i] = $root.google.container.v1.AdditionalIPRangesConfig.fromObject(object.additionalIpRangesConfigs[i]); + } + } + if (object.autoIpamConfig != null) { + if (typeof object.autoIpamConfig !== "object") + throw TypeError(".google.container.v1.IPAllocationPolicy.autoIpamConfig: object expected"); + message.autoIpamConfig = $root.google.container.v1.AutoIpamConfig.fromObject(object.autoIpamConfig); + } return message; }; @@ -17239,6 +18928,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalIpRangesConfigs = []; if (options.defaults) { object.useIpAliases = false; object.createSubnetwork = false; @@ -17260,6 +18951,7 @@ object.servicesIpv6CidrBlock = ""; object.additionalPodRangesConfig = null; object.defaultPodIpv4RangeUtilization = 0; + object.autoIpamConfig = null; } if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) object.useIpAliases = message.useIpAliases; @@ -17301,6 +18993,13 @@ object.additionalPodRangesConfig = $root.google.container.v1.AdditionalPodRangesConfig.toObject(message.additionalPodRangesConfig, options); if (message.defaultPodIpv4RangeUtilization != null && message.hasOwnProperty("defaultPodIpv4RangeUtilization")) object.defaultPodIpv4RangeUtilization = options.json && !isFinite(message.defaultPodIpv4RangeUtilization) ? String(message.defaultPodIpv4RangeUtilization) : message.defaultPodIpv4RangeUtilization; + if (message.additionalIpRangesConfigs && message.additionalIpRangesConfigs.length) { + object.additionalIpRangesConfigs = []; + for (var j = 0; j < message.additionalIpRangesConfigs.length; ++j) + object.additionalIpRangesConfigs[j] = $root.google.container.v1.AdditionalIPRangesConfig.toObject(message.additionalIpRangesConfigs[j], options); + } + if (message.autoIpamConfig != null && message.hasOwnProperty("autoIpamConfig")) + object.autoIpamConfig = $root.google.container.v1.AutoIpamConfig.toObject(message.autoIpamConfig, options); return object; }; @@ -17415,6 +19114,7 @@ * @property {boolean|null} [satisfiesPzi] Cluster satisfiesPzi * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] Cluster userManagedKeysConfig * @property {google.container.v1.IRBACBindingConfig|null} [rbacBindingConfig] Cluster rbacBindingConfig + * @property {google.container.v1.IGkeAutoUpgradeConfig|null} [gkeAutoUpgradeConfig] Cluster gkeAutoUpgradeConfig * @property {google.container.v1.IAnonymousAuthenticationConfig|null} [anonymousAuthenticationConfig] Cluster anonymousAuthenticationConfig */ @@ -18047,6 +19747,14 @@ */ Cluster.prototype.rbacBindingConfig = null; + /** + * Cluster gkeAutoUpgradeConfig. + * @member {google.container.v1.IGkeAutoUpgradeConfig|null|undefined} gkeAutoUpgradeConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.gkeAutoUpgradeConfig = null; + /** * Cluster anonymousAuthenticationConfig. * @member {google.container.v1.IAnonymousAuthenticationConfig|null|undefined} anonymousAuthenticationConfig @@ -18270,6 +19978,8 @@ if (message.alphaClusterFeatureGates != null && message.alphaClusterFeatureGates.length) for (var i = 0; i < message.alphaClusterFeatureGates.length; ++i) writer.uint32(/* id 160, wireType 2 =*/1282).string(message.alphaClusterFeatureGates[i]); + if (message.gkeAutoUpgradeConfig != null && Object.hasOwnProperty.call(message, "gkeAutoUpgradeConfig")) + $root.google.container.v1.GkeAutoUpgradeConfig.encode(message.gkeAutoUpgradeConfig, writer.uint32(/* id 163, wireType 2 =*/1306).fork()).ldelim(); if (message.anonymousAuthenticationConfig != null && Object.hasOwnProperty.call(message, "anonymousAuthenticationConfig")) $root.google.container.v1.AnonymousAuthenticationConfig.encode(message.anonymousAuthenticationConfig, writer.uint32(/* id 164, wireType 2 =*/1314).fork()).ldelim(); return writer; @@ -18641,6 +20351,10 @@ message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); break; } + case 163: { + message.gkeAutoUpgradeConfig = $root.google.container.v1.GkeAutoUpgradeConfig.decode(reader, reader.uint32()); + break; + } case 164: { message.anonymousAuthenticationConfig = $root.google.container.v1.AnonymousAuthenticationConfig.decode(reader, reader.uint32()); break; @@ -19041,6 +20755,11 @@ return "rbacBindingConfig." + error; } } + if (message.gkeAutoUpgradeConfig != null && message.hasOwnProperty("gkeAutoUpgradeConfig")) { + var error = $root.google.container.v1.GkeAutoUpgradeConfig.verify(message.gkeAutoUpgradeConfig); + if (error) + return "gkeAutoUpgradeConfig." + error; + } if (message.anonymousAuthenticationConfig != null && message.hasOwnProperty("anonymousAuthenticationConfig")) { var error = $root.google.container.v1.AnonymousAuthenticationConfig.verify(message.anonymousAuthenticationConfig); if (error) @@ -19403,6 +21122,11 @@ throw TypeError(".google.container.v1.Cluster.rbacBindingConfig: object expected"); message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.rbacBindingConfig); } + if (object.gkeAutoUpgradeConfig != null) { + if (typeof object.gkeAutoUpgradeConfig !== "object") + throw TypeError(".google.container.v1.Cluster.gkeAutoUpgradeConfig: object expected"); + message.gkeAutoUpgradeConfig = $root.google.container.v1.GkeAutoUpgradeConfig.fromObject(object.gkeAutoUpgradeConfig); + } if (object.anonymousAuthenticationConfig != null) { if (typeof object.anonymousAuthenticationConfig !== "object") throw TypeError(".google.container.v1.Cluster.anonymousAuthenticationConfig: object expected"); @@ -19499,6 +21223,7 @@ object.enterpriseConfig = null; object.secretManagerConfig = null; object.compliancePostureConfig = null; + object.gkeAutoUpgradeConfig = null; object.anonymousAuthenticationConfig = null; } if (message.name != null && message.hasOwnProperty("name")) @@ -19687,6 +21412,8 @@ for (var j = 0; j < message.alphaClusterFeatureGates.length; ++j) object.alphaClusterFeatureGates[j] = message.alphaClusterFeatureGates[j]; } + if (message.gkeAutoUpgradeConfig != null && message.hasOwnProperty("gkeAutoUpgradeConfig")) + object.gkeAutoUpgradeConfig = $root.google.container.v1.GkeAutoUpgradeConfig.toObject(message.gkeAutoUpgradeConfig, options); if (message.anonymousAuthenticationConfig != null && message.hasOwnProperty("anonymousAuthenticationConfig")) object.anonymousAuthenticationConfig = $root.google.container.v1.AnonymousAuthenticationConfig.toObject(message.anonymousAuthenticationConfig, options); return object; @@ -20403,6 +22130,7 @@ * Properties of an AnonymousAuthenticationConfig. * @memberof google.container.v1 * @interface IAnonymousAuthenticationConfig + * @property {google.container.v1.AnonymousAuthenticationConfig.Mode|null} [mode] AnonymousAuthenticationConfig mode */ /** @@ -20420,6 +22148,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * AnonymousAuthenticationConfig mode. + * @member {google.container.v1.AnonymousAuthenticationConfig.Mode} mode + * @memberof google.container.v1.AnonymousAuthenticationConfig + * @instance + */ + AnonymousAuthenticationConfig.prototype.mode = 0; + /** * Creates a new AnonymousAuthenticationConfig instance using the specified properties. * @function create @@ -20444,6 +22180,8 @@ AnonymousAuthenticationConfig.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); return writer; }; @@ -20480,6 +22218,10 @@ if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -20515,6 +22257,15 @@ AnonymousAuthenticationConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -20529,7 +22280,28 @@ AnonymousAuthenticationConfig.fromObject = function fromObject(object) { if (object instanceof $root.google.container.v1.AnonymousAuthenticationConfig) return object; - return new $root.google.container.v1.AnonymousAuthenticationConfig(); + var message = new $root.google.container.v1.AnonymousAuthenticationConfig(); + 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 "ENABLED": + case 1: + message.mode = 1; + break; + case "LIMITED": + case 2: + message.mode = 2; + break; + } + return message; }; /** @@ -20541,8 +22313,15 @@ * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AnonymousAuthenticationConfig.toObject = function toObject() { - return {}; + AnonymousAuthenticationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.container.v1.AnonymousAuthenticationConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.AnonymousAuthenticationConfig.Mode[message.mode] : message.mode; + return object; }; /** @@ -20571,6 +22350,22 @@ return typeUrlPrefix + "/google.container.v1.AnonymousAuthenticationConfig"; }; + /** + * Mode enum. + * @name google.container.v1.AnonymousAuthenticationConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} LIMITED=2 LIMITED value + */ + AnonymousAuthenticationConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "LIMITED"] = 2; + return values; + })(); + return AnonymousAuthenticationConfig; })(); @@ -22530,10 +24325,14 @@ * @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 + * @property {google.container.v1.IDesiredAdditionalIPRangesConfig|null} [desiredAdditionalIpRangesConfig] ClusterUpdate desiredAdditionalIpRangesConfig * @property {google.container.v1.IDesiredEnterpriseConfig|null} [desiredEnterpriseConfig] ClusterUpdate desiredEnterpriseConfig + * @property {google.container.v1.IAutoIpamConfig|null} [desiredAutoIpamConfig] ClusterUpdate desiredAutoIpamConfig * @property {boolean|null} [desiredDisableL4LbFirewallReconciliation] ClusterUpdate desiredDisableL4LbFirewallReconciliation * @property {google.container.v1.ILinuxNodeConfig|null} [desiredNodePoolAutoConfigLinuxNodeConfig] ClusterUpdate desiredNodePoolAutoConfigLinuxNodeConfig + * @property {google.container.v1.IUserManagedKeysConfig|null} [desiredUserManagedKeysConfig] ClusterUpdate desiredUserManagedKeysConfig * @property {google.container.v1.IAnonymousAuthenticationConfig|null} [desiredAnonymousAuthenticationConfig] ClusterUpdate desiredAnonymousAuthenticationConfig + * @property {google.container.v1.IGkeAutoUpgradeConfig|null} [gkeAutoUpgradeConfig] ClusterUpdate gkeAutoUpgradeConfig */ /** @@ -23056,6 +24855,14 @@ */ ClusterUpdate.prototype.desiredRbacBindingConfig = null; + /** + * ClusterUpdate desiredAdditionalIpRangesConfig. + * @member {google.container.v1.IDesiredAdditionalIPRangesConfig|null|undefined} desiredAdditionalIpRangesConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAdditionalIpRangesConfig = null; + /** * ClusterUpdate desiredEnterpriseConfig. * @member {google.container.v1.IDesiredEnterpriseConfig|null|undefined} desiredEnterpriseConfig @@ -23064,6 +24871,14 @@ */ ClusterUpdate.prototype.desiredEnterpriseConfig = null; + /** + * ClusterUpdate desiredAutoIpamConfig. + * @member {google.container.v1.IAutoIpamConfig|null|undefined} desiredAutoIpamConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredAutoIpamConfig = null; + /** * ClusterUpdate desiredDisableL4LbFirewallReconciliation. * @member {boolean|null|undefined} desiredDisableL4LbFirewallReconciliation @@ -23080,6 +24895,14 @@ */ ClusterUpdate.prototype.desiredNodePoolAutoConfigLinuxNodeConfig = null; + /** + * ClusterUpdate desiredUserManagedKeysConfig. + * @member {google.container.v1.IUserManagedKeysConfig|null|undefined} desiredUserManagedKeysConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredUserManagedKeysConfig = null; + /** * ClusterUpdate desiredAnonymousAuthenticationConfig. * @member {google.container.v1.IAnonymousAuthenticationConfig|null|undefined} desiredAnonymousAuthenticationConfig @@ -23088,6 +24911,14 @@ */ ClusterUpdate.prototype.desiredAnonymousAuthenticationConfig = null; + /** + * ClusterUpdate gkeAutoUpgradeConfig. + * @member {google.container.v1.IGkeAutoUpgradeConfig|null|undefined} gkeAutoUpgradeConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.gkeAutoUpgradeConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -23302,12 +25133,20 @@ $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(); + if (message.desiredAdditionalIpRangesConfig != null && Object.hasOwnProperty.call(message, "desiredAdditionalIpRangesConfig")) + $root.google.container.v1.DesiredAdditionalIPRangesConfig.encode(message.desiredAdditionalIpRangesConfig, writer.uint32(/* id 145, wireType 2 =*/1162).fork()).ldelim(); if (message.desiredEnterpriseConfig != null && Object.hasOwnProperty.call(message, "desiredEnterpriseConfig")) $root.google.container.v1.DesiredEnterpriseConfig.encode(message.desiredEnterpriseConfig, writer.uint32(/* id 147, wireType 2 =*/1178).fork()).ldelim(); + if (message.desiredAutoIpamConfig != null && Object.hasOwnProperty.call(message, "desiredAutoIpamConfig")) + $root.google.container.v1.AutoIpamConfig.encode(message.desiredAutoIpamConfig, writer.uint32(/* id 148, wireType 2 =*/1186).fork()).ldelim(); if (message.desiredDisableL4LbFirewallReconciliation != null && Object.hasOwnProperty.call(message, "desiredDisableL4LbFirewallReconciliation")) writer.uint32(/* id 149, wireType 0 =*/1192).bool(message.desiredDisableL4LbFirewallReconciliation); if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigLinuxNodeConfig")) $root.google.container.v1.LinuxNodeConfig.encode(message.desiredNodePoolAutoConfigLinuxNodeConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + if (message.desiredUserManagedKeysConfig != null && Object.hasOwnProperty.call(message, "desiredUserManagedKeysConfig")) + $root.google.container.v1.UserManagedKeysConfig.encode(message.desiredUserManagedKeysConfig, writer.uint32(/* id 152, wireType 2 =*/1218).fork()).ldelim(); + if (message.gkeAutoUpgradeConfig != null && Object.hasOwnProperty.call(message, "gkeAutoUpgradeConfig")) + $root.google.container.v1.GkeAutoUpgradeConfig.encode(message.gkeAutoUpgradeConfig, writer.uint32(/* id 154, wireType 2 =*/1234).fork()).ldelim(); if (message.desiredAnonymousAuthenticationConfig != null && Object.hasOwnProperty.call(message, "desiredAnonymousAuthenticationConfig")) $root.google.container.v1.AnonymousAuthenticationConfig.encode(message.desiredAnonymousAuthenticationConfig, writer.uint32(/* id 156, wireType 2 =*/1250).fork()).ldelim(); return writer; @@ -23600,10 +25439,18 @@ message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); break; } + case 145: { + message.desiredAdditionalIpRangesConfig = $root.google.container.v1.DesiredAdditionalIPRangesConfig.decode(reader, reader.uint32()); + break; + } case 147: { message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.decode(reader, reader.uint32()); break; } + case 148: { + message.desiredAutoIpamConfig = $root.google.container.v1.AutoIpamConfig.decode(reader, reader.uint32()); + break; + } case 149: { message.desiredDisableL4LbFirewallReconciliation = reader.bool(); break; @@ -23612,10 +25459,18 @@ message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.decode(reader, reader.uint32()); break; } + case 152: { + message.desiredUserManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.decode(reader, reader.uint32()); + break; + } case 156: { message.desiredAnonymousAuthenticationConfig = $root.google.container.v1.AnonymousAuthenticationConfig.decode(reader, reader.uint32()); break; } + case 154: { + message.gkeAutoUpgradeConfig = $root.google.container.v1.GkeAutoUpgradeConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -23983,11 +25838,21 @@ return "desiredRbacBindingConfig." + error; } } + if (message.desiredAdditionalIpRangesConfig != null && message.hasOwnProperty("desiredAdditionalIpRangesConfig")) { + var error = $root.google.container.v1.DesiredAdditionalIPRangesConfig.verify(message.desiredAdditionalIpRangesConfig); + if (error) + return "desiredAdditionalIpRangesConfig." + error; + } if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) { var error = $root.google.container.v1.DesiredEnterpriseConfig.verify(message.desiredEnterpriseConfig); if (error) return "desiredEnterpriseConfig." + error; } + if (message.desiredAutoIpamConfig != null && message.hasOwnProperty("desiredAutoIpamConfig")) { + var error = $root.google.container.v1.AutoIpamConfig.verify(message.desiredAutoIpamConfig); + if (error) + return "desiredAutoIpamConfig." + error; + } if (message.desiredDisableL4LbFirewallReconciliation != null && message.hasOwnProperty("desiredDisableL4LbFirewallReconciliation")) { properties._desiredDisableL4LbFirewallReconciliation = 1; if (typeof message.desiredDisableL4LbFirewallReconciliation !== "boolean") @@ -23998,11 +25863,21 @@ if (error) return "desiredNodePoolAutoConfigLinuxNodeConfig." + error; } + if (message.desiredUserManagedKeysConfig != null && message.hasOwnProperty("desiredUserManagedKeysConfig")) { + var error = $root.google.container.v1.UserManagedKeysConfig.verify(message.desiredUserManagedKeysConfig); + if (error) + return "desiredUserManagedKeysConfig." + error; + } if (message.desiredAnonymousAuthenticationConfig != null && message.hasOwnProperty("desiredAnonymousAuthenticationConfig")) { var error = $root.google.container.v1.AnonymousAuthenticationConfig.verify(message.desiredAnonymousAuthenticationConfig); if (error) return "desiredAnonymousAuthenticationConfig." + error; } + if (message.gkeAutoUpgradeConfig != null && message.hasOwnProperty("gkeAutoUpgradeConfig")) { + var error = $root.google.container.v1.GkeAutoUpgradeConfig.verify(message.gkeAutoUpgradeConfig); + if (error) + return "gkeAutoUpgradeConfig." + error; + } return null; }; @@ -24363,11 +26238,21 @@ throw TypeError(".google.container.v1.ClusterUpdate.desiredRbacBindingConfig: object expected"); message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.desiredRbacBindingConfig); } + if (object.desiredAdditionalIpRangesConfig != null) { + if (typeof object.desiredAdditionalIpRangesConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredAdditionalIpRangesConfig: object expected"); + message.desiredAdditionalIpRangesConfig = $root.google.container.v1.DesiredAdditionalIPRangesConfig.fromObject(object.desiredAdditionalIpRangesConfig); + } if (object.desiredEnterpriseConfig != null) { if (typeof object.desiredEnterpriseConfig !== "object") throw TypeError(".google.container.v1.ClusterUpdate.desiredEnterpriseConfig: object expected"); message.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.fromObject(object.desiredEnterpriseConfig); } + if (object.desiredAutoIpamConfig != null) { + if (typeof object.desiredAutoIpamConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredAutoIpamConfig: object expected"); + message.desiredAutoIpamConfig = $root.google.container.v1.AutoIpamConfig.fromObject(object.desiredAutoIpamConfig); + } if (object.desiredDisableL4LbFirewallReconciliation != null) message.desiredDisableL4LbFirewallReconciliation = Boolean(object.desiredDisableL4LbFirewallReconciliation); if (object.desiredNodePoolAutoConfigLinuxNodeConfig != null) { @@ -24375,11 +26260,21 @@ throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigLinuxNodeConfig: object expected"); message.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.fromObject(object.desiredNodePoolAutoConfigLinuxNodeConfig); } + if (object.desiredUserManagedKeysConfig != null) { + if (typeof object.desiredUserManagedKeysConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredUserManagedKeysConfig: object expected"); + message.desiredUserManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.fromObject(object.desiredUserManagedKeysConfig); + } if (object.desiredAnonymousAuthenticationConfig != null) { if (typeof object.desiredAnonymousAuthenticationConfig !== "object") throw TypeError(".google.container.v1.ClusterUpdate.desiredAnonymousAuthenticationConfig: object expected"); message.desiredAnonymousAuthenticationConfig = $root.google.container.v1.AnonymousAuthenticationConfig.fromObject(object.desiredAnonymousAuthenticationConfig); } + if (object.gkeAutoUpgradeConfig != null) { + if (typeof object.gkeAutoUpgradeConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.gkeAutoUpgradeConfig: object expected"); + message.gkeAutoUpgradeConfig = $root.google.container.v1.GkeAutoUpgradeConfig.fromObject(object.gkeAutoUpgradeConfig); + } return message; }; @@ -24452,8 +26347,12 @@ object.desiredNodeKubeletConfig = null; object.desiredNodePoolAutoConfigKubeletConfig = null; object.userManagedKeysConfig = null; + object.desiredAdditionalIpRangesConfig = null; object.desiredEnterpriseConfig = null; + object.desiredAutoIpamConfig = null; object.desiredNodePoolAutoConfigLinuxNodeConfig = null; + object.desiredUserManagedKeysConfig = null; + object.gkeAutoUpgradeConfig = null; object.desiredAnonymousAuthenticationConfig = null; } if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) @@ -24612,8 +26511,12 @@ if (options.oneofs) object._desiredRbacBindingConfig = "desiredRbacBindingConfig"; } + if (message.desiredAdditionalIpRangesConfig != null && message.hasOwnProperty("desiredAdditionalIpRangesConfig")) + object.desiredAdditionalIpRangesConfig = $root.google.container.v1.DesiredAdditionalIPRangesConfig.toObject(message.desiredAdditionalIpRangesConfig, options); if (message.desiredEnterpriseConfig != null && message.hasOwnProperty("desiredEnterpriseConfig")) object.desiredEnterpriseConfig = $root.google.container.v1.DesiredEnterpriseConfig.toObject(message.desiredEnterpriseConfig, options); + if (message.desiredAutoIpamConfig != null && message.hasOwnProperty("desiredAutoIpamConfig")) + object.desiredAutoIpamConfig = $root.google.container.v1.AutoIpamConfig.toObject(message.desiredAutoIpamConfig, options); if (message.desiredDisableL4LbFirewallReconciliation != null && message.hasOwnProperty("desiredDisableL4LbFirewallReconciliation")) { object.desiredDisableL4LbFirewallReconciliation = message.desiredDisableL4LbFirewallReconciliation; if (options.oneofs) @@ -24621,6 +26524,10 @@ } if (message.desiredNodePoolAutoConfigLinuxNodeConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigLinuxNodeConfig")) object.desiredNodePoolAutoConfigLinuxNodeConfig = $root.google.container.v1.LinuxNodeConfig.toObject(message.desiredNodePoolAutoConfigLinuxNodeConfig, options); + if (message.desiredUserManagedKeysConfig != null && message.hasOwnProperty("desiredUserManagedKeysConfig")) + object.desiredUserManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.toObject(message.desiredUserManagedKeysConfig, options); + if (message.gkeAutoUpgradeConfig != null && message.hasOwnProperty("gkeAutoUpgradeConfig")) + object.gkeAutoUpgradeConfig = $root.google.container.v1.GkeAutoUpgradeConfig.toObject(message.gkeAutoUpgradeConfig, options); if (message.desiredAnonymousAuthenticationConfig != null && message.hasOwnProperty("desiredAnonymousAuthenticationConfig")) object.desiredAnonymousAuthenticationConfig = $root.google.container.v1.AnonymousAuthenticationConfig.toObject(message.desiredAnonymousAuthenticationConfig, options); return object; @@ -24921,6 +26828,654 @@ return AdditionalPodRangesConfig; })(); + v1.AdditionalIPRangesConfig = (function() { + + /** + * Properties of an AdditionalIPRangesConfig. + * @memberof google.container.v1 + * @interface IAdditionalIPRangesConfig + * @property {string|null} [subnetwork] AdditionalIPRangesConfig subnetwork + * @property {Array.|null} [podIpv4RangeNames] AdditionalIPRangesConfig podIpv4RangeNames + */ + + /** + * Constructs a new AdditionalIPRangesConfig. + * @memberof google.container.v1 + * @classdesc Represents an AdditionalIPRangesConfig. + * @implements IAdditionalIPRangesConfig + * @constructor + * @param {google.container.v1.IAdditionalIPRangesConfig=} [properties] Properties to set + */ + function AdditionalIPRangesConfig(properties) { + this.podIpv4RangeNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdditionalIPRangesConfig subnetwork. + * @member {string} subnetwork + * @memberof google.container.v1.AdditionalIPRangesConfig + * @instance + */ + AdditionalIPRangesConfig.prototype.subnetwork = ""; + + /** + * AdditionalIPRangesConfig podIpv4RangeNames. + * @member {Array.} podIpv4RangeNames + * @memberof google.container.v1.AdditionalIPRangesConfig + * @instance + */ + AdditionalIPRangesConfig.prototype.podIpv4RangeNames = $util.emptyArray; + + /** + * Creates a new AdditionalIPRangesConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {google.container.v1.IAdditionalIPRangesConfig=} [properties] Properties to set + * @returns {google.container.v1.AdditionalIPRangesConfig} AdditionalIPRangesConfig instance + */ + AdditionalIPRangesConfig.create = function create(properties) { + return new AdditionalIPRangesConfig(properties); + }; + + /** + * Encodes the specified AdditionalIPRangesConfig message. Does not implicitly {@link google.container.v1.AdditionalIPRangesConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {google.container.v1.IAdditionalIPRangesConfig} message AdditionalIPRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalIPRangesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subnetwork); + if (message.podIpv4RangeNames != null && message.podIpv4RangeNames.length) + for (var i = 0; i < message.podIpv4RangeNames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.podIpv4RangeNames[i]); + return writer; + }; + + /** + * Encodes the specified AdditionalIPRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.AdditionalIPRangesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {google.container.v1.IAdditionalIPRangesConfig} message AdditionalIPRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdditionalIPRangesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdditionalIPRangesConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AdditionalIPRangesConfig} AdditionalIPRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalIPRangesConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AdditionalIPRangesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.subnetwork = reader.string(); + break; + } + case 2: { + if (!(message.podIpv4RangeNames && message.podIpv4RangeNames.length)) + message.podIpv4RangeNames = []; + message.podIpv4RangeNames.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AdditionalIPRangesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AdditionalIPRangesConfig} AdditionalIPRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdditionalIPRangesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdditionalIPRangesConfig message. + * @function verify + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdditionalIPRangesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.podIpv4RangeNames != null && message.hasOwnProperty("podIpv4RangeNames")) { + if (!Array.isArray(message.podIpv4RangeNames)) + return "podIpv4RangeNames: array expected"; + for (var i = 0; i < message.podIpv4RangeNames.length; ++i) + if (!$util.isString(message.podIpv4RangeNames[i])) + return "podIpv4RangeNames: string[] expected"; + } + return null; + }; + + /** + * Creates an AdditionalIPRangesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AdditionalIPRangesConfig} AdditionalIPRangesConfig + */ + AdditionalIPRangesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AdditionalIPRangesConfig) + return object; + var message = new $root.google.container.v1.AdditionalIPRangesConfig(); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.podIpv4RangeNames) { + if (!Array.isArray(object.podIpv4RangeNames)) + throw TypeError(".google.container.v1.AdditionalIPRangesConfig.podIpv4RangeNames: array expected"); + message.podIpv4RangeNames = []; + for (var i = 0; i < object.podIpv4RangeNames.length; ++i) + message.podIpv4RangeNames[i] = String(object.podIpv4RangeNames[i]); + } + return message; + }; + + /** + * Creates a plain object from an AdditionalIPRangesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {google.container.v1.AdditionalIPRangesConfig} message AdditionalIPRangesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdditionalIPRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.podIpv4RangeNames = []; + if (options.defaults) + object.subnetwork = ""; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.podIpv4RangeNames && message.podIpv4RangeNames.length) { + object.podIpv4RangeNames = []; + for (var j = 0; j < message.podIpv4RangeNames.length; ++j) + object.podIpv4RangeNames[j] = message.podIpv4RangeNames[j]; + } + return object; + }; + + /** + * Converts this AdditionalIPRangesConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AdditionalIPRangesConfig + * @instance + * @returns {Object.} JSON object + */ + AdditionalIPRangesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdditionalIPRangesConfig + * @function getTypeUrl + * @memberof google.container.v1.AdditionalIPRangesConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdditionalIPRangesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AdditionalIPRangesConfig"; + }; + + return AdditionalIPRangesConfig; + })(); + + v1.DesiredAdditionalIPRangesConfig = (function() { + + /** + * Properties of a DesiredAdditionalIPRangesConfig. + * @memberof google.container.v1 + * @interface IDesiredAdditionalIPRangesConfig + * @property {Array.|null} [additionalIpRangesConfigs] DesiredAdditionalIPRangesConfig additionalIpRangesConfigs + */ + + /** + * Constructs a new DesiredAdditionalIPRangesConfig. + * @memberof google.container.v1 + * @classdesc Represents a DesiredAdditionalIPRangesConfig. + * @implements IDesiredAdditionalIPRangesConfig + * @constructor + * @param {google.container.v1.IDesiredAdditionalIPRangesConfig=} [properties] Properties to set + */ + function DesiredAdditionalIPRangesConfig(properties) { + this.additionalIpRangesConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DesiredAdditionalIPRangesConfig additionalIpRangesConfigs. + * @member {Array.} additionalIpRangesConfigs + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @instance + */ + DesiredAdditionalIPRangesConfig.prototype.additionalIpRangesConfigs = $util.emptyArray; + + /** + * Creates a new DesiredAdditionalIPRangesConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {google.container.v1.IDesiredAdditionalIPRangesConfig=} [properties] Properties to set + * @returns {google.container.v1.DesiredAdditionalIPRangesConfig} DesiredAdditionalIPRangesConfig instance + */ + DesiredAdditionalIPRangesConfig.create = function create(properties) { + return new DesiredAdditionalIPRangesConfig(properties); + }; + + /** + * Encodes the specified DesiredAdditionalIPRangesConfig message. Does not implicitly {@link google.container.v1.DesiredAdditionalIPRangesConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {google.container.v1.IDesiredAdditionalIPRangesConfig} message DesiredAdditionalIPRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DesiredAdditionalIPRangesConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.additionalIpRangesConfigs != null && message.additionalIpRangesConfigs.length) + for (var i = 0; i < message.additionalIpRangesConfigs.length; ++i) + $root.google.container.v1.AdditionalIPRangesConfig.encode(message.additionalIpRangesConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DesiredAdditionalIPRangesConfig message, length delimited. Does not implicitly {@link google.container.v1.DesiredAdditionalIPRangesConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {google.container.v1.IDesiredAdditionalIPRangesConfig} message DesiredAdditionalIPRangesConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DesiredAdditionalIPRangesConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DesiredAdditionalIPRangesConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DesiredAdditionalIPRangesConfig} DesiredAdditionalIPRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DesiredAdditionalIPRangesConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DesiredAdditionalIPRangesConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.additionalIpRangesConfigs && message.additionalIpRangesConfigs.length)) + message.additionalIpRangesConfigs = []; + message.additionalIpRangesConfigs.push($root.google.container.v1.AdditionalIPRangesConfig.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DesiredAdditionalIPRangesConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DesiredAdditionalIPRangesConfig} DesiredAdditionalIPRangesConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DesiredAdditionalIPRangesConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DesiredAdditionalIPRangesConfig message. + * @function verify + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DesiredAdditionalIPRangesConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.additionalIpRangesConfigs != null && message.hasOwnProperty("additionalIpRangesConfigs")) { + if (!Array.isArray(message.additionalIpRangesConfigs)) + return "additionalIpRangesConfigs: array expected"; + for (var i = 0; i < message.additionalIpRangesConfigs.length; ++i) { + var error = $root.google.container.v1.AdditionalIPRangesConfig.verify(message.additionalIpRangesConfigs[i]); + if (error) + return "additionalIpRangesConfigs." + error; + } + } + return null; + }; + + /** + * Creates a DesiredAdditionalIPRangesConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DesiredAdditionalIPRangesConfig} DesiredAdditionalIPRangesConfig + */ + DesiredAdditionalIPRangesConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DesiredAdditionalIPRangesConfig) + return object; + var message = new $root.google.container.v1.DesiredAdditionalIPRangesConfig(); + if (object.additionalIpRangesConfigs) { + if (!Array.isArray(object.additionalIpRangesConfigs)) + throw TypeError(".google.container.v1.DesiredAdditionalIPRangesConfig.additionalIpRangesConfigs: array expected"); + message.additionalIpRangesConfigs = []; + for (var i = 0; i < object.additionalIpRangesConfigs.length; ++i) { + if (typeof object.additionalIpRangesConfigs[i] !== "object") + throw TypeError(".google.container.v1.DesiredAdditionalIPRangesConfig.additionalIpRangesConfigs: object expected"); + message.additionalIpRangesConfigs[i] = $root.google.container.v1.AdditionalIPRangesConfig.fromObject(object.additionalIpRangesConfigs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DesiredAdditionalIPRangesConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {google.container.v1.DesiredAdditionalIPRangesConfig} message DesiredAdditionalIPRangesConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DesiredAdditionalIPRangesConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalIpRangesConfigs = []; + if (message.additionalIpRangesConfigs && message.additionalIpRangesConfigs.length) { + object.additionalIpRangesConfigs = []; + for (var j = 0; j < message.additionalIpRangesConfigs.length; ++j) + object.additionalIpRangesConfigs[j] = $root.google.container.v1.AdditionalIPRangesConfig.toObject(message.additionalIpRangesConfigs[j], options); + } + return object; + }; + + /** + * Converts this DesiredAdditionalIPRangesConfig to JSON. + * @function toJSON + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @instance + * @returns {Object.} JSON object + */ + DesiredAdditionalIPRangesConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DesiredAdditionalIPRangesConfig + * @function getTypeUrl + * @memberof google.container.v1.DesiredAdditionalIPRangesConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DesiredAdditionalIPRangesConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DesiredAdditionalIPRangesConfig"; + }; + + return DesiredAdditionalIPRangesConfig; + })(); + + v1.AutoIpamConfig = (function() { + + /** + * Properties of an AutoIpamConfig. + * @memberof google.container.v1 + * @interface IAutoIpamConfig + */ + + /** + * Constructs a new AutoIpamConfig. + * @memberof google.container.v1 + * @classdesc Represents an AutoIpamConfig. + * @implements IAutoIpamConfig + * @constructor + * @param {google.container.v1.IAutoIpamConfig=} [properties] Properties to set + */ + function AutoIpamConfig(properties) { + if (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 AutoIpamConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {google.container.v1.IAutoIpamConfig=} [properties] Properties to set + * @returns {google.container.v1.AutoIpamConfig} AutoIpamConfig instance + */ + AutoIpamConfig.create = function create(properties) { + return new AutoIpamConfig(properties); + }; + + /** + * Encodes the specified AutoIpamConfig message. Does not implicitly {@link google.container.v1.AutoIpamConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {google.container.v1.IAutoIpamConfig} message AutoIpamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoIpamConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AutoIpamConfig message, length delimited. Does not implicitly {@link google.container.v1.AutoIpamConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {google.container.v1.IAutoIpamConfig} message AutoIpamConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoIpamConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoIpamConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.AutoIpamConfig} AutoIpamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoIpamConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.AutoIpamConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoIpamConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.AutoIpamConfig} AutoIpamConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoIpamConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoIpamConfig message. + * @function verify + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoIpamConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AutoIpamConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.AutoIpamConfig} AutoIpamConfig + */ + AutoIpamConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.AutoIpamConfig) + return object; + return new $root.google.container.v1.AutoIpamConfig(); + }; + + /** + * Creates a plain object from an AutoIpamConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {google.container.v1.AutoIpamConfig} message AutoIpamConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoIpamConfig.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AutoIpamConfig to JSON. + * @function toJSON + * @memberof google.container.v1.AutoIpamConfig + * @instance + * @returns {Object.} JSON object + */ + AutoIpamConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoIpamConfig + * @function getTypeUrl + * @memberof google.container.v1.AutoIpamConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoIpamConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.AutoIpamConfig"; + }; + + return AutoIpamConfig; + })(); + v1.RangeInfo = (function() { /** @@ -27733,6 +30288,7 @@ * @property {Array.|null} [storagePools] UpdateNodePoolRequest storagePools * @property {google.protobuf.IDuration|null} [maxRunDuration] UpdateNodePoolRequest maxRunDuration * @property {boolean|null} [flexStart] UpdateNodePoolRequest flexStart + * @property {google.container.v1.IBootDisk|null} [bootDisk] UpdateNodePoolRequest bootDisk */ /** @@ -28025,6 +30581,14 @@ */ UpdateNodePoolRequest.prototype.flexStart = null; + /** + * UpdateNodePoolRequest bootDisk. + * @member {google.container.v1.IBootDisk|null|undefined} bootDisk + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.bootDisk = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -28129,6 +30693,8 @@ $root.google.protobuf.Duration.encode(message.maxRunDuration, writer.uint32(/* id 45, wireType 2 =*/362).fork()).ldelim(); if (message.flexStart != null && Object.hasOwnProperty.call(message, "flexStart")) writer.uint32(/* id 46, wireType 0 =*/368).bool(message.flexStart); + if (message.bootDisk != null && Object.hasOwnProperty.call(message, "bootDisk")) + $root.google.container.v1.BootDisk.encode(message.bootDisk, writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); return writer; }; @@ -28307,6 +30873,10 @@ message.flexStart = reader.bool(); break; } + case 47: { + message.bootDisk = $root.google.container.v1.BootDisk.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -28499,6 +31069,11 @@ if (typeof message.flexStart !== "boolean") return "flexStart: boolean expected"; } + if (message.bootDisk != null && message.hasOwnProperty("bootDisk")) { + var error = $root.google.container.v1.BootDisk.verify(message.bootDisk); + if (error) + return "bootDisk." + error; + } return null; }; @@ -28664,6 +31239,11 @@ } if (object.flexStart != null) message.flexStart = Boolean(object.flexStart); + if (object.bootDisk != null) { + if (typeof object.bootDisk !== "object") + throw TypeError(".google.container.v1.UpdateNodePoolRequest.bootDisk: object expected"); + message.bootDisk = $root.google.container.v1.BootDisk.fromObject(object.bootDisk); + } return message; }; @@ -28720,6 +31300,7 @@ object.containerdConfig = null; object.queuedProvisioning = null; object.maxRunDuration = null; + object.bootDisk = null; } if (message.projectId != null && message.hasOwnProperty("projectId")) object.projectId = message.projectId; @@ -28804,6 +31385,8 @@ if (options.oneofs) object._flexStart = "flexStart"; } + if (message.bootDisk != null && message.hasOwnProperty("bootDisk")) + object.bootDisk = $root.google.container.v1.BootDisk.toObject(message.bootDisk, options); return object; }; @@ -41570,6 +44153,7 @@ * @property {google.container.v1.ClusterAutoscaling.AutoscalingProfile|null} [autoscalingProfile] ClusterAutoscaling autoscalingProfile * @property {google.container.v1.IAutoprovisioningNodePoolDefaults|null} [autoprovisioningNodePoolDefaults] ClusterAutoscaling autoprovisioningNodePoolDefaults * @property {Array.|null} [autoprovisioningLocations] ClusterAutoscaling autoprovisioningLocations + * @property {google.container.v1.IDefaultComputeClassConfig|null} [defaultComputeClassConfig] ClusterAutoscaling defaultComputeClassConfig */ /** @@ -41629,6 +44213,14 @@ */ ClusterAutoscaling.prototype.autoprovisioningLocations = $util.emptyArray; + /** + * ClusterAutoscaling defaultComputeClassConfig. + * @member {google.container.v1.IDefaultComputeClassConfig|null|undefined} defaultComputeClassConfig + * @memberof google.container.v1.ClusterAutoscaling + * @instance + */ + ClusterAutoscaling.prototype.defaultComputeClassConfig = null; + /** * Creates a new ClusterAutoscaling instance using the specified properties. * @function create @@ -41665,6 +44257,8 @@ if (message.autoprovisioningLocations != null && message.autoprovisioningLocations.length) for (var i = 0; i < message.autoprovisioningLocations.length; ++i) writer.uint32(/* id 5, wireType 2 =*/42).string(message.autoprovisioningLocations[i]); + if (message.defaultComputeClassConfig != null && Object.hasOwnProperty.call(message, "defaultComputeClassConfig")) + $root.google.container.v1.DefaultComputeClassConfig.encode(message.defaultComputeClassConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -41725,6 +44319,10 @@ message.autoprovisioningLocations.push(reader.string()); break; } + case 9: { + message.defaultComputeClassConfig = $root.google.container.v1.DefaultComputeClassConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -41793,6 +44391,11 @@ if (!$util.isString(message.autoprovisioningLocations[i])) return "autoprovisioningLocations: string[] expected"; } + if (message.defaultComputeClassConfig != null && message.hasOwnProperty("defaultComputeClassConfig")) { + var error = $root.google.container.v1.DefaultComputeClassConfig.verify(message.defaultComputeClassConfig); + if (error) + return "defaultComputeClassConfig." + error; + } return null; }; @@ -41852,6 +44455,11 @@ for (var i = 0; i < object.autoprovisioningLocations.length; ++i) message.autoprovisioningLocations[i] = String(object.autoprovisioningLocations[i]); } + if (object.defaultComputeClassConfig != null) { + if (typeof object.defaultComputeClassConfig !== "object") + throw TypeError(".google.container.v1.ClusterAutoscaling.defaultComputeClassConfig: object expected"); + message.defaultComputeClassConfig = $root.google.container.v1.DefaultComputeClassConfig.fromObject(object.defaultComputeClassConfig); + } return message; }; @@ -41876,6 +44484,7 @@ object.enableNodeAutoprovisioning = false; object.autoscalingProfile = options.enums === String ? "PROFILE_UNSPECIFIED" : 0; object.autoprovisioningNodePoolDefaults = null; + object.defaultComputeClassConfig = null; } if (message.enableNodeAutoprovisioning != null && message.hasOwnProperty("enableNodeAutoprovisioning")) object.enableNodeAutoprovisioning = message.enableNodeAutoprovisioning; @@ -41893,6 +44502,8 @@ for (var j = 0; j < message.autoprovisioningLocations.length; ++j) object.autoprovisioningLocations[j] = message.autoprovisioningLocations[j]; } + if (message.defaultComputeClassConfig != null && message.hasOwnProperty("defaultComputeClassConfig")) + object.defaultComputeClassConfig = $root.google.container.v1.DefaultComputeClassConfig.toObject(message.defaultComputeClassConfig, options); return object; }; @@ -42703,6 +45314,211 @@ return ResourceLimit; })(); + v1.DefaultComputeClassConfig = (function() { + + /** + * Properties of a DefaultComputeClassConfig. + * @memberof google.container.v1 + * @interface IDefaultComputeClassConfig + * @property {boolean|null} [enabled] DefaultComputeClassConfig enabled + */ + + /** + * Constructs a new DefaultComputeClassConfig. + * @memberof google.container.v1 + * @classdesc Represents a DefaultComputeClassConfig. + * @implements IDefaultComputeClassConfig + * @constructor + * @param {google.container.v1.IDefaultComputeClassConfig=} [properties] Properties to set + */ + function DefaultComputeClassConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DefaultComputeClassConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.DefaultComputeClassConfig + * @instance + */ + DefaultComputeClassConfig.prototype.enabled = false; + + /** + * Creates a new DefaultComputeClassConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {google.container.v1.IDefaultComputeClassConfig=} [properties] Properties to set + * @returns {google.container.v1.DefaultComputeClassConfig} DefaultComputeClassConfig instance + */ + DefaultComputeClassConfig.create = function create(properties) { + return new DefaultComputeClassConfig(properties); + }; + + /** + * Encodes the specified DefaultComputeClassConfig message. Does not implicitly {@link google.container.v1.DefaultComputeClassConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {google.container.v1.IDefaultComputeClassConfig} message DefaultComputeClassConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultComputeClassConfig.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 DefaultComputeClassConfig message, length delimited. Does not implicitly {@link google.container.v1.DefaultComputeClassConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {google.container.v1.IDefaultComputeClassConfig} message DefaultComputeClassConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DefaultComputeClassConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DefaultComputeClassConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.DefaultComputeClassConfig} DefaultComputeClassConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultComputeClassConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.DefaultComputeClassConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DefaultComputeClassConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.DefaultComputeClassConfig} DefaultComputeClassConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DefaultComputeClassConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DefaultComputeClassConfig message. + * @function verify + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DefaultComputeClassConfig.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 DefaultComputeClassConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.DefaultComputeClassConfig} DefaultComputeClassConfig + */ + DefaultComputeClassConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.DefaultComputeClassConfig) + return object; + var message = new $root.google.container.v1.DefaultComputeClassConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a DefaultComputeClassConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {google.container.v1.DefaultComputeClassConfig} message DefaultComputeClassConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DefaultComputeClassConfig.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 DefaultComputeClassConfig to JSON. + * @function toJSON + * @memberof google.container.v1.DefaultComputeClassConfig + * @instance + * @returns {Object.} JSON object + */ + DefaultComputeClassConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DefaultComputeClassConfig + * @function getTypeUrl + * @memberof google.container.v1.DefaultComputeClassConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DefaultComputeClassConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.DefaultComputeClassConfig"; + }; + + return DefaultComputeClassConfig; + })(); + v1.NodePoolAutoscaling = (function() { /** @@ -46250,6 +49066,7 @@ case 7: case 9: case 10: + case 11: break; } if (message.message != null && message.hasOwnProperty("message")) @@ -46332,6 +49149,10 @@ case 10: message.code = 10; break; + case "CLOUD_KMS_KEY_DESTROYED": + case 11: + message.code = 11; + break; } if (object.message != null) message.message = String(object.message); @@ -46479,6 +49300,7 @@ * @property {number} CLOUD_KMS_KEY_ERROR=7 CLOUD_KMS_KEY_ERROR value * @property {number} CA_EXPIRING=9 CA_EXPIRING value * @property {number} NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS=10 NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS value + * @property {number} CLOUD_KMS_KEY_DESTROYED=11 CLOUD_KMS_KEY_DESTROYED value */ StatusCondition.Code = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -46490,6 +49312,7 @@ values[valuesById[7] = "CLOUD_KMS_KEY_ERROR"] = 7; values[valuesById[9] = "CA_EXPIRING"] = 9; values[valuesById[10] = "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS"] = 10; + values[valuesById[11] = "CLOUD_KMS_KEY_DESTROYED"] = 11; return values; })(); @@ -64622,6 +67445,323 @@ return SecretManagerConfig; })(); + v1.BootDisk = (function() { + + /** + * Properties of a BootDisk. + * @memberof google.container.v1 + * @interface IBootDisk + * @property {string|null} [diskType] BootDisk diskType + * @property {number|Long|null} [sizeGb] BootDisk sizeGb + * @property {number|Long|null} [provisionedIops] BootDisk provisionedIops + * @property {number|Long|null} [provisionedThroughput] BootDisk provisionedThroughput + */ + + /** + * Constructs a new BootDisk. + * @memberof google.container.v1 + * @classdesc Represents a BootDisk. + * @implements IBootDisk + * @constructor + * @param {google.container.v1.IBootDisk=} [properties] Properties to set + */ + function BootDisk(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BootDisk diskType. + * @member {string} diskType + * @memberof google.container.v1.BootDisk + * @instance + */ + BootDisk.prototype.diskType = ""; + + /** + * BootDisk sizeGb. + * @member {number|Long} sizeGb + * @memberof google.container.v1.BootDisk + * @instance + */ + BootDisk.prototype.sizeGb = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BootDisk provisionedIops. + * @member {number|Long} provisionedIops + * @memberof google.container.v1.BootDisk + * @instance + */ + BootDisk.prototype.provisionedIops = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BootDisk provisionedThroughput. + * @member {number|Long} provisionedThroughput + * @memberof google.container.v1.BootDisk + * @instance + */ + BootDisk.prototype.provisionedThroughput = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BootDisk instance using the specified properties. + * @function create + * @memberof google.container.v1.BootDisk + * @static + * @param {google.container.v1.IBootDisk=} [properties] Properties to set + * @returns {google.container.v1.BootDisk} BootDisk instance + */ + BootDisk.create = function create(properties) { + return new BootDisk(properties); + }; + + /** + * Encodes the specified BootDisk message. Does not implicitly {@link google.container.v1.BootDisk.verify|verify} messages. + * @function encode + * @memberof google.container.v1.BootDisk + * @static + * @param {google.container.v1.IBootDisk} message BootDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BootDisk.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.diskType != null && Object.hasOwnProperty.call(message, "diskType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.diskType); + if (message.sizeGb != null && Object.hasOwnProperty.call(message, "sizeGb")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sizeGb); + if (message.provisionedIops != null && Object.hasOwnProperty.call(message, "provisionedIops")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.provisionedIops); + if (message.provisionedThroughput != null && Object.hasOwnProperty.call(message, "provisionedThroughput")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.provisionedThroughput); + return writer; + }; + + /** + * Encodes the specified BootDisk message, length delimited. Does not implicitly {@link google.container.v1.BootDisk.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.BootDisk + * @static + * @param {google.container.v1.IBootDisk} message BootDisk message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BootDisk.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BootDisk message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.BootDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.BootDisk} BootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BootDisk.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.BootDisk(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.diskType = reader.string(); + break; + } + case 2: { + message.sizeGb = reader.int64(); + break; + } + case 3: { + message.provisionedIops = reader.int64(); + break; + } + case 4: { + message.provisionedThroughput = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BootDisk message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.BootDisk + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.BootDisk} BootDisk + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BootDisk.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BootDisk message. + * @function verify + * @memberof google.container.v1.BootDisk + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BootDisk.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.diskType != null && message.hasOwnProperty("diskType")) + if (!$util.isString(message.diskType)) + return "diskType: string expected"; + if (message.sizeGb != null && message.hasOwnProperty("sizeGb")) + if (!$util.isInteger(message.sizeGb) && !(message.sizeGb && $util.isInteger(message.sizeGb.low) && $util.isInteger(message.sizeGb.high))) + return "sizeGb: integer|Long expected"; + if (message.provisionedIops != null && message.hasOwnProperty("provisionedIops")) + if (!$util.isInteger(message.provisionedIops) && !(message.provisionedIops && $util.isInteger(message.provisionedIops.low) && $util.isInteger(message.provisionedIops.high))) + return "provisionedIops: integer|Long expected"; + if (message.provisionedThroughput != null && message.hasOwnProperty("provisionedThroughput")) + if (!$util.isInteger(message.provisionedThroughput) && !(message.provisionedThroughput && $util.isInteger(message.provisionedThroughput.low) && $util.isInteger(message.provisionedThroughput.high))) + return "provisionedThroughput: integer|Long expected"; + return null; + }; + + /** + * Creates a BootDisk message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.BootDisk + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.BootDisk} BootDisk + */ + BootDisk.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.BootDisk) + return object; + var message = new $root.google.container.v1.BootDisk(); + if (object.diskType != null) + message.diskType = String(object.diskType); + if (object.sizeGb != null) + if ($util.Long) + (message.sizeGb = $util.Long.fromValue(object.sizeGb)).unsigned = false; + else if (typeof object.sizeGb === "string") + message.sizeGb = parseInt(object.sizeGb, 10); + else if (typeof object.sizeGb === "number") + message.sizeGb = object.sizeGb; + else if (typeof object.sizeGb === "object") + message.sizeGb = new $util.LongBits(object.sizeGb.low >>> 0, object.sizeGb.high >>> 0).toNumber(); + if (object.provisionedIops != null) + if ($util.Long) + (message.provisionedIops = $util.Long.fromValue(object.provisionedIops)).unsigned = false; + else if (typeof object.provisionedIops === "string") + message.provisionedIops = parseInt(object.provisionedIops, 10); + else if (typeof object.provisionedIops === "number") + message.provisionedIops = object.provisionedIops; + else if (typeof object.provisionedIops === "object") + message.provisionedIops = new $util.LongBits(object.provisionedIops.low >>> 0, object.provisionedIops.high >>> 0).toNumber(); + if (object.provisionedThroughput != null) + if ($util.Long) + (message.provisionedThroughput = $util.Long.fromValue(object.provisionedThroughput)).unsigned = false; + else if (typeof object.provisionedThroughput === "string") + message.provisionedThroughput = parseInt(object.provisionedThroughput, 10); + else if (typeof object.provisionedThroughput === "number") + message.provisionedThroughput = object.provisionedThroughput; + else if (typeof object.provisionedThroughput === "object") + message.provisionedThroughput = new $util.LongBits(object.provisionedThroughput.low >>> 0, object.provisionedThroughput.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BootDisk message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.BootDisk + * @static + * @param {google.container.v1.BootDisk} message BootDisk + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BootDisk.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.diskType = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sizeGb = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sizeGb = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.provisionedIops = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.provisionedIops = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.provisionedThroughput = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.provisionedThroughput = options.longs === String ? "0" : 0; + } + if (message.diskType != null && message.hasOwnProperty("diskType")) + object.diskType = message.diskType; + if (message.sizeGb != null && message.hasOwnProperty("sizeGb")) + if (typeof message.sizeGb === "number") + object.sizeGb = options.longs === String ? String(message.sizeGb) : message.sizeGb; + else + object.sizeGb = options.longs === String ? $util.Long.prototype.toString.call(message.sizeGb) : options.longs === Number ? new $util.LongBits(message.sizeGb.low >>> 0, message.sizeGb.high >>> 0).toNumber() : message.sizeGb; + if (message.provisionedIops != null && message.hasOwnProperty("provisionedIops")) + if (typeof message.provisionedIops === "number") + object.provisionedIops = options.longs === String ? String(message.provisionedIops) : message.provisionedIops; + else + object.provisionedIops = options.longs === String ? $util.Long.prototype.toString.call(message.provisionedIops) : options.longs === Number ? new $util.LongBits(message.provisionedIops.low >>> 0, message.provisionedIops.high >>> 0).toNumber() : message.provisionedIops; + if (message.provisionedThroughput != null && message.hasOwnProperty("provisionedThroughput")) + if (typeof message.provisionedThroughput === "number") + object.provisionedThroughput = options.longs === String ? String(message.provisionedThroughput) : message.provisionedThroughput; + else + object.provisionedThroughput = options.longs === String ? $util.Long.prototype.toString.call(message.provisionedThroughput) : options.longs === Number ? new $util.LongBits(message.provisionedThroughput.low >>> 0, message.provisionedThroughput.high >>> 0).toNumber() : message.provisionedThroughput; + return object; + }; + + /** + * Converts this BootDisk to JSON. + * @function toJSON + * @memberof google.container.v1.BootDisk + * @instance + * @returns {Object.} JSON object + */ + BootDisk.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BootDisk + * @function getTypeUrl + * @memberof google.container.v1.BootDisk + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BootDisk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.BootDisk"; + }; + + return BootDisk; + })(); + v1.SecondaryBootDisk = (function() { /** @@ -67116,6 +70256,244 @@ return NodePoolUpgradeInfo; })(); + v1.GkeAutoUpgradeConfig = (function() { + + /** + * Properties of a GkeAutoUpgradeConfig. + * @memberof google.container.v1 + * @interface IGkeAutoUpgradeConfig + * @property {google.container.v1.GkeAutoUpgradeConfig.PatchMode|null} [patchMode] GkeAutoUpgradeConfig patchMode + */ + + /** + * Constructs a new GkeAutoUpgradeConfig. + * @memberof google.container.v1 + * @classdesc Represents a GkeAutoUpgradeConfig. + * @implements IGkeAutoUpgradeConfig + * @constructor + * @param {google.container.v1.IGkeAutoUpgradeConfig=} [properties] Properties to set + */ + function GkeAutoUpgradeConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GkeAutoUpgradeConfig patchMode. + * @member {google.container.v1.GkeAutoUpgradeConfig.PatchMode} patchMode + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @instance + */ + GkeAutoUpgradeConfig.prototype.patchMode = 0; + + /** + * Creates a new GkeAutoUpgradeConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {google.container.v1.IGkeAutoUpgradeConfig=} [properties] Properties to set + * @returns {google.container.v1.GkeAutoUpgradeConfig} GkeAutoUpgradeConfig instance + */ + GkeAutoUpgradeConfig.create = function create(properties) { + return new GkeAutoUpgradeConfig(properties); + }; + + /** + * Encodes the specified GkeAutoUpgradeConfig message. Does not implicitly {@link google.container.v1.GkeAutoUpgradeConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {google.container.v1.IGkeAutoUpgradeConfig} message GkeAutoUpgradeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeAutoUpgradeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patchMode != null && Object.hasOwnProperty.call(message, "patchMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.patchMode); + return writer; + }; + + /** + * Encodes the specified GkeAutoUpgradeConfig message, length delimited. Does not implicitly {@link google.container.v1.GkeAutoUpgradeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {google.container.v1.IGkeAutoUpgradeConfig} message GkeAutoUpgradeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GkeAutoUpgradeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GkeAutoUpgradeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.GkeAutoUpgradeConfig} GkeAutoUpgradeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeAutoUpgradeConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.GkeAutoUpgradeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.patchMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GkeAutoUpgradeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.GkeAutoUpgradeConfig} GkeAutoUpgradeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GkeAutoUpgradeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GkeAutoUpgradeConfig message. + * @function verify + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GkeAutoUpgradeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patchMode != null && message.hasOwnProperty("patchMode")) + switch (message.patchMode) { + default: + return "patchMode: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a GkeAutoUpgradeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.GkeAutoUpgradeConfig} GkeAutoUpgradeConfig + */ + GkeAutoUpgradeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.GkeAutoUpgradeConfig) + return object; + var message = new $root.google.container.v1.GkeAutoUpgradeConfig(); + switch (object.patchMode) { + default: + if (typeof object.patchMode === "number") { + message.patchMode = object.patchMode; + break; + } + break; + case "PATCH_MODE_UNSPECIFIED": + case 0: + message.patchMode = 0; + break; + case "ACCELERATED": + case 1: + message.patchMode = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a GkeAutoUpgradeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {google.container.v1.GkeAutoUpgradeConfig} message GkeAutoUpgradeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GkeAutoUpgradeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.patchMode = options.enums === String ? "PATCH_MODE_UNSPECIFIED" : 0; + if (message.patchMode != null && message.hasOwnProperty("patchMode")) + object.patchMode = options.enums === String ? $root.google.container.v1.GkeAutoUpgradeConfig.PatchMode[message.patchMode] === undefined ? message.patchMode : $root.google.container.v1.GkeAutoUpgradeConfig.PatchMode[message.patchMode] : message.patchMode; + return object; + }; + + /** + * Converts this GkeAutoUpgradeConfig to JSON. + * @function toJSON + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @instance + * @returns {Object.} JSON object + */ + GkeAutoUpgradeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GkeAutoUpgradeConfig + * @function getTypeUrl + * @memberof google.container.v1.GkeAutoUpgradeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GkeAutoUpgradeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.GkeAutoUpgradeConfig"; + }; + + /** + * PatchMode enum. + * @name google.container.v1.GkeAutoUpgradeConfig.PatchMode + * @enum {number} + * @property {number} PATCH_MODE_UNSPECIFIED=0 PATCH_MODE_UNSPECIFIED value + * @property {number} ACCELERATED=1 ACCELERATED value + */ + GkeAutoUpgradeConfig.PatchMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PATCH_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACCELERATED"] = 1; + return values; + })(); + + return GkeAutoUpgradeConfig; + })(); + return v1; })(); @@ -141956,6 +145334,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -141990,6 +145369,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -142022,6 +145409,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -142073,6 +145462,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -142124,6 +145517,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -142166,6 +145564,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -142184,8 +145587,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -142193,6 +145598,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -144015,6 +147422,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -144040,6 +147448,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -144066,6 +147482,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -144106,6 +147524,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -144146,6 +147568,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -144166,6 +147593,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -144182,10 +147614,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -144215,6 +147651,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -145091,6 +148779,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -145102,6 +148791,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -145116,6 +148806,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -145142,6 +148840,9 @@ 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(); return writer; }; @@ -145172,7 +148873,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -145182,6 +148883,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -145222,6 +148946,14 @@ 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"; + } return null; }; @@ -145242,6 +148974,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -145258,10 +148997,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -145900,6 +149647,251 @@ return values; })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + /** * LaunchStage enum. * @name google.api.LaunchStage @@ -146885,6 +150877,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -146899,6 +150892,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -146923,6 +150917,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -146945,6 +150940,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -146995,6 +150991,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -147116,6 +151120,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -147188,6 +151195,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -147290,6 +151303,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -147344,6 +151364,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -147396,6 +151417,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -147459,6 +151487,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -147524,6 +151556,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -147580,6 +151613,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -147628,6 +151666,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -147733,6 +151772,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -147785,6 +151832,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -147877,6 +151926,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -147990,6 +152043,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -148089,6 +152151,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -148118,6 +152200,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -148163,6 +152246,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -150207,6 +154292,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -150267,6 +154353,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -150304,6 +154398,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -150366,6 +154462,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -150434,6 +154534,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -150483,6 +154592,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -150507,6 +154636,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -150527,6 +154657,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -152845,6 +156977,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -152965,6 +157098,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -153039,6 +157180,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -153140,6 +157283,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -153275,6 +157422,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -153463,6 +157615,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -153560,6 +157717,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -153592,6 +157750,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -153864,6 +158024,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -153905,6 +158066,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -154004,6 +158169,488 @@ return EditionDefault; })(); + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + return FieldOptions; })(); @@ -154596,6 +159243,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -154639,6 +159287,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -154677,6 +159333,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -154728,6 +159386,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -154780,6 +159442,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -154813,6 +159480,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -154845,6 +159517,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -154852,6 +159525,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -156291,6 +160966,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -156356,6 +161033,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -156392,6 +161085,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -156452,6 +161149,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -156542,6 +161247,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -156681,6 +161406,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -156704,6 +161477,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -156717,6 +161492,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -156844,6 +161623,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -157028,6 +162020,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -157045,6 +162038,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -157093,6 +162087,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -157145,6 +162143,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -157253,7 +162255,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -157280,12 +162283,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -157311,10 +162322,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -157355,8 +162368,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -157399,6 +162416,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -157411,10 +162429,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -157442,6 +162465,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -157483,10 +162510,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -157505,13 +162537,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -158726,6 +163761,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Duration = (function() { /** diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index d4b36ef1bbf1..5199c008ed86 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -948,6 +948,20 @@ "(google.api.field_behavior)": "OPTIONAL", "proto3_optional": true } + }, + "transparentHugepageEnabled": { + "type": "TransparentHugepageEnabled", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "transparentHugepageDefrag": { + "type": "TransparentHugepageDefrag", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -989,6 +1003,24 @@ } } } + }, + "TransparentHugepageEnabled": { + "values": { + "TRANSPARENT_HUGEPAGE_ENABLED_UNSPECIFIED": 0, + "TRANSPARENT_HUGEPAGE_ENABLED_ALWAYS": 1, + "TRANSPARENT_HUGEPAGE_ENABLED_MADVISE": 2, + "TRANSPARENT_HUGEPAGE_ENABLED_NEVER": 3 + } + }, + "TransparentHugepageDefrag": { + "values": { + "TRANSPARENT_HUGEPAGE_DEFRAG_UNSPECIFIED": 0, + "TRANSPARENT_HUGEPAGE_DEFRAG_ALWAYS": 1, + "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER": 2, + "TRANSPARENT_HUGEPAGE_DEFRAG_DEFER_WITH_MADVISE": 3, + "TRANSPARENT_HUGEPAGE_DEFRAG_MADVISE": 4, + "TRANSPARENT_HUGEPAGE_DEFRAG_NEVER": 5 + } } } }, @@ -1015,6 +1047,11 @@ "oneof": [ "insecureKubeletReadonlyPortEnabled" ] + }, + "_singleProcessOomKill": { + "oneof": [ + "singleProcessOomKill" + ] } }, "fields": { @@ -1104,6 +1141,49 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "evictionSoft": { + "type": "EvictionSignals", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "evictionSoftGracePeriod": { + "type": "EvictionGracePeriod", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "evictionMinimumReclaim": { + "type": "EvictionMinimumReclaim", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "evictionMaxPodGracePeriodSeconds": { + "type": "int32", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxParallelImagePulls": { + "type": "int32", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "singleProcessOomKill": { + "type": "bool", + "id": 22, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } } }, @@ -1127,6 +1207,144 @@ } } }, + "EvictionSignals": { + "fields": { + "memoryAvailable": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodefsAvailable": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodefsInodesFree": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "imagefsAvailable": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "imagefsInodesFree": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pidAvailable": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EvictionGracePeriod": { + "fields": { + "memoryAvailable": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodefsAvailable": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodefsInodesFree": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "imagefsAvailable": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "imagefsInodesFree": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pidAvailable": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EvictionMinimumReclaim": { + "fields": { + "memoryAvailable": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodefsAvailable": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nodefsInodesFree": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "imagefsAvailable": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "imagefsInodesFree": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pidAvailable": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "NodeConfig": { "oneofs": { "_fastSocket": { @@ -1353,6 +1571,10 @@ "options": { "proto3_optional": true } + }, + "bootDisk": { + "type": "BootDisk", + "id": 57 } }, "nested": { @@ -1487,6 +1709,13 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "subnetwork": { + "type": "string", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -1620,11 +1849,26 @@ } }, "SoleTenantConfig": { + "oneofs": { + "_minNodeCpus": { + "oneof": [ + "minNodeCpus" + ] + } + }, "fields": { "nodeAffinities": { "rule": "repeated", "type": "NodeAffinity", "id": 1 + }, + "minNodeCpus": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { @@ -1894,6 +2138,10 @@ "highScaleCheckpointingConfig": { "type": "HighScaleCheckpointingConfig", "id": 22 + }, + "lustreCsiDriverConfig": { + "type": "LustreCsiDriverConfig", + "id": 23 } } }, @@ -2085,6 +2333,18 @@ } } }, + "LustreCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "enableLegacyLustrePort": { + "type": "bool", + "id": 3 + } + } + }, "RayOperatorConfig": { "fields": { "enabled": { @@ -2341,6 +2601,21 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "additionalIpRangesConfigs": { + "rule": "repeated", + "type": "AdditionalIPRangesConfig", + "id": 29, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "autoIpamConfig": { + "type": "AutoIpamConfig", + "id": 30, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2766,6 +3041,10 @@ "proto3_optional": true } }, + "gkeAutoUpgradeConfig": { + "type": "GkeAutoUpgradeConfig", + "id": 163 + }, "anonymousAuthenticationConfig": { "type": "AnonymousAuthenticationConfig", "id": 164 @@ -2878,7 +3157,21 @@ } }, "AnonymousAuthenticationConfig": { - "fields": {} + "fields": { + "mode": { + "type": "Mode", + "id": 1 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "ENABLED": 1, + "LIMITED": 2 + } + } + } }, "CompliancePostureConfig": { "oneofs": { @@ -3370,7 +3663,10 @@ }, "userManagedKeysConfig": { "type": "UserManagedKeysConfig", - "id": 143 + "id": 143, + "options": { + "deprecated": true + } }, "desiredRbacBindingConfig": { "type": "RBACBindingConfig", @@ -3379,10 +3675,18 @@ "proto3_optional": true } }, + "desiredAdditionalIpRangesConfig": { + "type": "DesiredAdditionalIPRangesConfig", + "id": 145 + }, "desiredEnterpriseConfig": { "type": "DesiredEnterpriseConfig", "id": 147 }, + "desiredAutoIpamConfig": { + "type": "AutoIpamConfig", + "id": 148 + }, "desiredDisableL4LbFirewallReconciliation": { "type": "bool", "id": 149, @@ -3394,9 +3698,17 @@ "type": "LinuxNodeConfig", "id": 150 }, + "desiredUserManagedKeysConfig": { + "type": "UserManagedKeysConfig", + "id": 152 + }, "desiredAnonymousAuthenticationConfig": { "type": "AnonymousAuthenticationConfig", "id": 156 + }, + "gkeAutoUpgradeConfig": { + "type": "GkeAutoUpgradeConfig", + "id": 154 } } }, @@ -3417,6 +3729,31 @@ } } }, + "AdditionalIPRangesConfig": { + "fields": { + "subnetwork": { + "type": "string", + "id": 1 + }, + "podIpv4RangeNames": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "DesiredAdditionalIPRangesConfig": { + "fields": { + "additionalIpRangesConfigs": { + "rule": "repeated", + "type": "AdditionalIPRangesConfig", + "id": 1 + } + } + }, + "AutoIpamConfig": { + "fields": {} + }, "RangeInfo": { "fields": { "rangeName": { @@ -3931,6 +4268,10 @@ "options": { "proto3_optional": true } + }, + "bootDisk": { + "type": "BootDisk", + "id": 47 } } }, @@ -5207,6 +5548,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "defaultComputeClassConfig": { + "type": "DefaultComputeClassConfig", + "id": 9 } }, "nested": { @@ -5297,6 +5642,14 @@ } } }, + "DefaultComputeClassConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, "NodePoolAutoscaling": { "fields": { "enabled": { @@ -5698,7 +6051,8 @@ "SET_BY_OPERATOR": 4, "CLOUD_KMS_KEY_ERROR": 7, "CA_EXPIRING": 9, - "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS": 10 + "NODE_SERVICE_ACCOUNT_MISSING_PERMISSIONS": 10, + "CLOUD_KMS_KEY_DESTROYED": 11 } } } @@ -7168,6 +7522,26 @@ } } }, + "BootDisk": { + "fields": { + "diskType": { + "type": "string", + "id": 1 + }, + "sizeGb": { + "type": "int64", + "id": 2 + }, + "provisionedIops": { + "type": "int64", + "id": 3 + }, + "provisionedThroughput": { + "type": "int64", + "id": 4 + } + } + }, "SecondaryBootDisk": { "fields": { "mode": { @@ -7472,6 +7846,22 @@ } } } + }, + "GkeAutoUpgradeConfig": { + "fields": { + "patchMode": { + "type": "PatchMode", + "id": 1 + } + }, + "nested": { + "PatchMode": { + "values": { + "PATCH_MODE_UNSPECIFIED": 0, + "ACCELERATED": 1 + } + } + } } } }, @@ -15597,8 +15987,7 @@ "java_multiple_files": true, "java_outer_classname": "ResourceProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "http": { @@ -15722,6 +16111,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -15862,6 +16255,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -15919,6 +16334,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -15980,6 +16400,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -16112,12 +16545,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -16156,6 +16596,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -16244,6 +16689,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -16469,6 +16918,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -16683,6 +17136,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -16818,7 +17272,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -16846,6 +17301,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -16915,6 +17374,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -17003,6 +17482,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -17145,6 +17628,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -17155,6 +17639,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -17165,6 +17650,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -17175,6 +17661,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -17185,7 +17672,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -17195,27 +17683,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -17260,7 +17759,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -17275,6 +17780,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -17302,11 +17834,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -17319,6 +17866,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -17404,6 +17957,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Duration": { "fields": { "seconds": { diff --git a/packages/google-container/samples/generated/v1/cluster_manager.set_locations.js b/packages/google-container/samples/generated/v1/cluster_manager.set_locations.js index 4deb6eebccb9..db55008e299e 100644 --- a/packages/google-container/samples/generated/v1/cluster_manager.set_locations.js +++ b/packages/google-container/samples/generated/v1/cluster_manager.set_locations.js @@ -30,10 +30,10 @@ function main(locations) { */ /** * Required. The desired list of Google Compute Engine - * zones (https://cloud.google.com/compute/docs/zones#available) in which the - * cluster's nodes should be located. Changing the locations a cluster is in - * will result in nodes being either created or removed from the cluster, - * depending on whether locations are being added or removed. + * zones (https://cloud.google.com/compute/docs/zones#available) + * in which the cluster's nodes should be located. Changing the locations a + * cluster is in will result in nodes being either created or removed from the + * cluster, depending on whether locations are being added or removed. * This list must always include the cluster's primary zone. */ // const locations = ['abc','def'] diff --git a/packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js b/packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js index 2d167ce40404..a55a3115047d 100644 --- a/packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js +++ b/packages/google-container/samples/generated/v1/cluster_manager.set_maintenance_policy.js @@ -35,8 +35,8 @@ function main(projectId, zone, clusterId, maintenancePolicy) { // const projectId = 'abc123' /** * Required. The name of the Google Compute Engine - * zone (https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. + * zone (https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. */ // const zone = 'abc123' /** 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 1558b2e867e1..cdfeafa3a2ff 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 @@ -42,8 +42,8 @@ function main(nodeVersion, imageType) { // const nodeVersion = 'abc123' /** * Required. The desired image type for the node pool. Please see - * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - * available image types. + * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + * for available image types. */ // const imageType = 'abc123' /** @@ -54,10 +54,10 @@ function main(nodeVersion, imageType) { // const name = 'abc123' /** * The desired list of Google Compute Engine - * zones (https://cloud.google.com/compute/docs/zones#available) in which the - * node pool's nodes should be located. Changing the locations for a node pool - * will result in nodes being either created or removed from the node pool, - * depending on whether locations are being added or removed. + * zones (https://cloud.google.com/compute/docs/zones#available) + * in which the node pool's nodes should be located. Changing the locations + * for a node pool will result in nodes being either created or removed from + * the node pool, depending on whether locations are being added or removed. */ // const locations = ['abc','def'] /** @@ -136,15 +136,16 @@ function main(nodeVersion, imageType) { // const windowsNodeConfig = {} /** * A list of hardware accelerators to be attached to each node. - * See https://cloud.google.com/compute/docs/gpus for more information about - * support for GPUs. + * See + * https://cloud.google.com/compute/docs/gpus + * for more information about support for GPUs. */ // const accelerators = [1,2,3,4] /** * Optional. The desired Google Compute Engine machine - * type (https://cloud.google.com/compute/docs/machine-types) for nodes in the - * node pool. Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified machine type. + * type (https://cloud.google.com/compute/docs/machine-types) + * for nodes in the node pool. Initiates an upgrade operation that migrates + * the nodes in the node pool to the specified machine type. */ // const machineType = 'abc123' /** @@ -191,6 +192,12 @@ function main(nodeVersion, imageType) { * Flex Start flag for enabling Flex Start VM. */ // const flexStart = true + /** + * The desired boot disk config for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified boot disk config. + */ + // const bootDisk = {} // 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 12099408bbe2..8c3ea34d77af 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": "6.2.0", + "version": "6.3.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 898483579bfb..b2e0a4efb937 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": "6.2.0", + "version": "6.3.0", "language": "TYPESCRIPT", "apis": [ { @@ -230,7 +230,7 @@ "segments": [ { "start": 25, - "end": 213, + "end": 220, "type": "FULL" } ], @@ -374,6 +374,10 @@ { "name": "flex_start", "type": "TYPE_BOOL" + }, + { + "name": "boot_disk", + "type": ".google.container.v1.BootDisk" } ], "resultType": ".google.container.v1.Operation", 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 89526c3907cd..14ad1e8f3949 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": "6.2.0", + "version": "6.3.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 bfaa8488c891..001dc1eb82ee 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": "6.2.0", + "version": "6.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/package.json b/packages/google-container/samples/package.json index afe239fa4925..338df932f97b 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": "^6.2.0", + "@google-cloud/container": "^6.3.0", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-container/src/v1/cluster_manager_client.ts b/packages/google-container/src/v1/cluster_manager_client.ts index a9db33d62bc8..89f3e9bd07fd 100644 --- a/packages/google-container/src/v1/cluster_manager_client.ts +++ b/packages/google-container/src/v1/cluster_manager_client.ts @@ -351,9 +351,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the parent field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides, or "-" for all zones. This field has been deprecated and - * replaced by the parent field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides, or "-" for all zones. This field has been + * deprecated and replaced by the parent field. * @param {string} request.parent * The parent (project and location) where the clusters will be listed. * Specified in the format `projects/* /locations/*`. @@ -458,9 +458,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to retrieve. * This field has been deprecated and replaced by the name field. @@ -581,9 +581,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the parent field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the parent field. * @param {google.container.v1.Cluster} request.cluster * Required. A [cluster * resource](https://cloud.google.com/container-engine/reference/rest/v1/projects.locations.clusters) @@ -690,9 +690,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -802,9 +802,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -825,18 +825,18 @@ export class ClusterManagerClient { * - "-": picks the Kubernetes master version * @param {string} request.imageType * Required. The desired image type for the node pool. Please see - * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images for - * available image types. + * https://cloud.google.com/kubernetes-engine/docs/concepts/node-images + * for available image types. * @param {string} request.name * The name (project, location, cluster, node pool) of the node pool to * update. Specified in the format * `projects/* /locations/* /clusters/* /nodePools/*`. * @param {string[]} request.locations * The desired list of Google Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) in which the - * node pool's nodes should be located. Changing the locations for a node pool - * will result in nodes being either created or removed from the node pool, - * depending on whether locations are being added or removed. + * [zones](https://cloud.google.com/compute/docs/zones#available) + * in which the node pool's nodes should be located. Changing the locations + * for a node pool will result in nodes being either created or removed from + * the node pool, depending on whether locations are being added or removed. * @param {google.container.v1.WorkloadMetadataConfig} request.workloadMetadataConfig * The desired workload metadata config for the node pool. * @param {google.container.v1.NodePool.UpgradeSettings} request.upgradeSettings @@ -881,13 +881,14 @@ export class ClusterManagerClient { * Parameters that can be configured on Windows nodes. * @param {number[]} request.accelerators * A list of hardware accelerators to be attached to each node. - * See https://cloud.google.com/compute/docs/gpus for more information about - * support for GPUs. + * See + * https://cloud.google.com/compute/docs/gpus + * for more information about support for GPUs. * @param {string} [request.machineType] * Optional. The desired [Google Compute Engine machine - * type](https://cloud.google.com/compute/docs/machine-types) for nodes in the - * node pool. Initiates an upgrade operation that migrates the nodes in the - * node pool to the specified machine type. + * type](https://cloud.google.com/compute/docs/machine-types) + * for nodes in the node pool. Initiates an upgrade operation that migrates + * the nodes in the node pool to the specified machine type. * @param {string} [request.diskType] * Optional. The desired disk type (e.g. 'pd-standard', 'pd-ssd' or * 'pd-balanced') for nodes in the node pool. @@ -916,6 +917,10 @@ export class ClusterManagerClient { * If unspecified, the nodes can exist indefinitely. * @param {boolean} request.flexStart * Flex Start flag for enabling Flex Start VM. + * @param {google.container.v1.BootDisk} request.bootDisk + * The desired boot disk config for nodes in the node pool. + * Initiates an upgrade operation that migrates the nodes in the + * node pool to the specified boot disk config. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1018,9 +1023,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -1135,9 +1140,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -1257,9 +1262,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -1379,9 +1384,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -1495,18 +1500,18 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. * @param {string[]} request.locations * Required. The desired list of Google Compute Engine - * [zones](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster's nodes should be located. Changing the locations a cluster is in - * will result in nodes being either created or removed from the cluster, - * depending on whether locations are being added or removed. + * [zones](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster's nodes should be located. Changing the locations a + * cluster is in will result in nodes being either created or removed from the + * cluster, depending on whether locations are being added or removed. * * This list must always include the cluster's primary zone. * @param {string} request.name @@ -1615,9 +1620,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -1738,9 +1743,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to upgrade. * This field has been deprecated and replaced by the name field. @@ -1860,9 +1865,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to delete. * This field has been deprecated and replaced by the name field. @@ -1970,9 +1975,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the parent field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) to return - * operations for, or `-` for all zones. This field has been deprecated and - * replaced by the parent field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * to return operations for, or `-` for all zones. This field has been + * deprecated and replaced by the parent field. * @param {string} request.parent * The parent (project and location) where the operations will be listed. * Specified in the format `projects/* /locations/*`. @@ -2077,9 +2082,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.operationId * Deprecated. The server-assigned `name` of the operation. * This field has been deprecated and replaced by the name field. @@ -2187,9 +2192,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * operation resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the operation resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.operationId * Deprecated. The server-assigned `name` of the operation. * This field has been deprecated and replaced by the name field. @@ -2297,9 +2302,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) to return - * operations for. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * to return operations for. This field has been deprecated and replaced by + * the name field. * @param {string} request.name * The name (project and location) of the server config to get, * specified in the format `projects/* /locations/*`. @@ -2499,9 +2504,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the parent field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the parent field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the parent field. @@ -2609,9 +2614,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the name field. @@ -2724,9 +2729,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the parent field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the parent - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the parent field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the parent field. @@ -2837,9 +2842,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the name field. @@ -3050,9 +3055,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to rollback. * This field has been deprecated and replaced by the name field. @@ -3168,9 +3173,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to update. * This field has been deprecated and replaced by the name field. @@ -3285,9 +3290,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the name field. @@ -3404,9 +3409,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to update. * This field has been deprecated and replaced by the name field. @@ -3516,9 +3521,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the name field. @@ -3628,9 +3633,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the name field. @@ -3740,9 +3745,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster to update. * This field has been deprecated and replaced by the name field. @@ -3857,9 +3862,9 @@ export class ClusterManagerClient { * This field has been deprecated and replaced by the name field. * @param {string} request.zone * Deprecated. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. This field has been deprecated and replaced by the name - * field. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. This field has been deprecated and replaced + * by the name field. * @param {string} request.clusterId * Deprecated. The name of the cluster. * This field has been deprecated and replaced by the name field. @@ -3968,8 +3973,8 @@ export class ClusterManagerClient { * number](https://cloud.google.com/resource-manager/docs/creating-managing-projects). * @param {string} request.zone * Required. The name of the Google Compute Engine - * [zone](https://cloud.google.com/compute/docs/zones#available) in which the - * cluster resides. + * [zone](https://cloud.google.com/compute/docs/zones#available) + * in which the cluster resides. * @param {string} request.clusterId * Required. The name of the cluster to update. * @param {google.container.v1.MaintenancePolicy} request.maintenancePolicy diff --git a/packages/google-maps-addressvalidation/.readme-partials.yaml b/packages/google-maps-addressvalidation/.readme-partials.yaml new file mode 100644 index 000000000000..a833fb8a3a94 --- /dev/null +++ b/packages/google-maps-addressvalidation/.readme-partials.yaml @@ -0,0 +1,23 @@ +body: |- + ## Terms of Service + + `@google-cloud/addressvalidation` uses Google Maps Platform services. Use of Google + Maps Platform services through this library is subject to the + [Google Maps Platform Terms of Service][gmp-tos]. + + This library is not a Google Maps Platform Core Service. + Therefore, the Google Maps Platform Terms of Service (e.g., Technical + Support Services, Service Level Agreements, and Deprecation Policy) + do not apply to this library. + + ### European Economic Area (EEA) developers + + If your billing address is in the European Economic Area, effective on + 8 July 2025, the [Google Maps Platform EEA Terms of Service][gmp-tos-eea] + will apply to your use of the Services. Functionality varies by region. + [Learn more][gmp-tos-eea-faq]. + + [gmp-tos]: https://cloud.google.com/maps-platform/terms + [gmp-tos-eea]: https://cloud.google.com/terms/maps-platform/eea + [gmp-tos-eea-faq]: https://developers.google.com/maps/comms/eea/faq + diff --git a/packages/google-maps-areainsights/.readme-partials.yaml b/packages/google-maps-areainsights/.readme-partials.yaml new file mode 100644 index 000000000000..e74416ef43be --- /dev/null +++ b/packages/google-maps-areainsights/.readme-partials.yaml @@ -0,0 +1,23 @@ +body: |- + ## Terms of Service + + `@googlemaps/areainsights` uses Google Maps Platform services. Use of Google + Maps Platform services through this library is subject to the + [Google Maps Platform Terms of Service][gmp-tos]. + + This library is not a Google Maps Platform Core Service. + Therefore, the Google Maps Platform Terms of Service (e.g., Technical + Support Services, Service Level Agreements, and Deprecation Policy) + do not apply to this library. + + ### European Economic Area (EEA) developers + + If your billing address is in the European Economic Area, effective on + 8 July 2025, the [Google Maps Platform EEA Terms of Service][gmp-tos-eea] + will apply to your use of the Services. Functionality varies by region. + [Learn more][gmp-tos-eea-faq]. + + [gmp-tos]: https://cloud.google.com/maps-platform/terms + [gmp-tos-eea]: https://cloud.google.com/terms/maps-platform/eea + [gmp-tos-eea-faq]: https://developers.google.com/maps/comms/eea/faq + diff --git a/packages/google-maps-fleetengine-delivery/.readme-partials.yaml b/packages/google-maps-fleetengine-delivery/.readme-partials.yaml new file mode 100644 index 000000000000..a4736da405f4 --- /dev/null +++ b/packages/google-maps-fleetengine-delivery/.readme-partials.yaml @@ -0,0 +1,23 @@ +body: |- + ## Terms of Service + + `@googlemaps/fleetengine-delivery` uses Google Maps Platform services. Use of Google + Maps Platform services through this library is subject to the + [Google Maps Platform Terms of Service][gmp-tos]. + + This library is not a Google Maps Platform Core Service. + Therefore, the Google Maps Platform Terms of Service (e.g., Technical + Support Services, Service Level Agreements, and Deprecation Policy) + do not apply to this library. + + ### European Economic Area (EEA) developers + + If your billing address is in the European Economic Area, effective on + 8 July 2025, the [Google Maps Platform EEA Terms of Service][gmp-tos-eea] + will apply to your use of the Services. Functionality varies by region. + [Learn more][gmp-tos-eea-faq]. + + [gmp-tos]: https://cloud.google.com/maps-platform/terms + [gmp-tos-eea]: https://cloud.google.com/terms/maps-platform/eea + [gmp-tos-eea-faq]: https://developers.google.com/maps/comms/eea/faq + diff --git a/packages/google-maps-fleetengine-delivery/CHANGELOG.md b/packages/google-maps-fleetengine-delivery/CHANGELOG.md index d6ea25a2fa77..ef74f2e36417 100644 --- a/packages/google-maps-fleetengine-delivery/CHANGELOG.md +++ b/packages/google-maps-fleetengine-delivery/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/fleetengine-delivery-v0.5.0...fleetengine-delivery-v0.6.0) (2025-07-17) + + +### Features + +* [fleetengine-delivery] add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version ([#6482](https://github.com/googleapis/google-cloud-node/issues/6482)) ([51493a7](https://github.com/googleapis/google-cloud-node/commit/51493a701fab76e1598048fc879eb1c31a3313b9)) + ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/fleetengine-delivery-v0.4.1...fleetengine-delivery-v0.5.0) (2025-07-09) diff --git a/packages/google-maps-fleetengine-delivery/package.json b/packages/google-maps-fleetengine-delivery/package.json index c5ed6e54e424..f89f6b3d279a 100644 --- a/packages/google-maps-fleetengine-delivery/package.json +++ b/packages/google-maps-fleetengine-delivery/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/fleetengine-delivery", - "version": "0.5.0", + "version": "0.6.0", "description": "Last Mile Fleet Solution Delivery API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-fleetengine-delivery/protos/google/maps/fleetengine/delivery/v1/common.proto b/packages/google-maps-fleetengine-delivery/protos/google/maps/fleetengine/delivery/v1/common.proto index 01a62c0b35e5..88ceee249040 100644 --- a/packages/google-maps-fleetengine-delivery/protos/google/maps/fleetengine/delivery/v1/common.proto +++ b/packages/google-maps-fleetengine-delivery/protos/google/maps/fleetengine/delivery/v1/common.proto @@ -144,6 +144,19 @@ message DeliveryVehicleLocation { // Accuracy of `raw_location` as a radius, in meters. google.protobuf.DoubleValue raw_location_accuracy = 25; + // The location from Android's Fused Location Provider. + google.type.LatLng flp_location = 29; + + // Update timestamp of the `flp_location` + google.protobuf.Timestamp flp_update_time = 30; + + // Accuracy of `flp_location` in meters as a radius. + google.protobuf.DoubleValue flp_latlng_accuracy_meters = 31; + + // Direction the vehicle is moving in degrees, as determined by the Fused + // Location Provider. 0 represents North. The valid range is [0,360). + google.protobuf.Int32Value flp_heading_degrees = 32; + // Supplemental location provided by the integrating app. google.type.LatLng supplemental_location = 18; diff --git a/packages/google-maps-fleetengine-delivery/protos/protos.d.ts b/packages/google-maps-fleetengine-delivery/protos/protos.d.ts index 1b12a2a87cc1..a88a9b1612af 100644 --- a/packages/google-maps-fleetengine-delivery/protos/protos.d.ts +++ b/packages/google-maps-fleetengine-delivery/protos/protos.d.ts @@ -222,6 +222,18 @@ export namespace maps { /** DeliveryVehicleLocation rawLocationAccuracy */ rawLocationAccuracy?: (google.protobuf.IDoubleValue|null); + /** DeliveryVehicleLocation flpLocation */ + flpLocation?: (google.type.ILatLng|null); + + /** DeliveryVehicleLocation flpUpdateTime */ + flpUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeliveryVehicleLocation flpLatlngAccuracyMeters */ + flpLatlngAccuracyMeters?: (google.protobuf.IDoubleValue|null); + + /** DeliveryVehicleLocation flpHeadingDegrees */ + flpHeadingDegrees?: (google.protobuf.IInt32Value|null); + /** DeliveryVehicleLocation supplementalLocation */ supplementalLocation?: (google.type.ILatLng|null); @@ -316,6 +328,18 @@ export namespace maps { /** DeliveryVehicleLocation rawLocationAccuracy. */ public rawLocationAccuracy?: (google.protobuf.IDoubleValue|null); + /** DeliveryVehicleLocation flpLocation. */ + public flpLocation?: (google.type.ILatLng|null); + + /** DeliveryVehicleLocation flpUpdateTime. */ + public flpUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeliveryVehicleLocation flpLatlngAccuracyMeters. */ + public flpLatlngAccuracyMeters?: (google.protobuf.IDoubleValue|null); + + /** DeliveryVehicleLocation flpHeadingDegrees. */ + public flpHeadingDegrees?: (google.protobuf.IInt32Value|null); + /** DeliveryVehicleLocation supplementalLocation. */ public supplementalLocation?: (google.type.ILatLng|null); @@ -4716,6 +4740,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -4733,6 +4760,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -5433,6 +5463,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -5447,6 +5480,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -5525,6 +5561,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -5851,6 +5999,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -5865,6 +6016,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -6189,6 +6343,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -6757,6 +7014,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -6787,6 +7045,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -6836,6 +7097,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -6970,6 +7234,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -7011,6 +7278,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -7858,6 +8128,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -7884,6 +8157,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -8818,6 +9094,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -8873,6 +9152,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -9093,6 +9375,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -9331,6 +9728,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -9353,6 +9753,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -9945,6 +10348,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -9974,6 +10383,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -10096,6 +10511,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -10215,8 +10740,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -10231,8 +10759,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -10765,6 +11296,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Timestamp. */ interface ITimestamp { diff --git a/packages/google-maps-fleetengine-delivery/protos/protos.js b/packages/google-maps-fleetengine-delivery/protos/protos.js index 6c7b171fa5c3..140a3932cece 100644 --- a/packages/google-maps-fleetengine-delivery/protos/protos.js +++ b/packages/google-maps-fleetengine-delivery/protos/protos.js @@ -424,6 +424,10 @@ * @property {google.protobuf.ITimestamp|null} [rawLocationTime] DeliveryVehicleLocation rawLocationTime * @property {maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor|null} [rawLocationSensor] DeliveryVehicleLocation rawLocationSensor * @property {google.protobuf.IDoubleValue|null} [rawLocationAccuracy] DeliveryVehicleLocation rawLocationAccuracy + * @property {google.type.ILatLng|null} [flpLocation] DeliveryVehicleLocation flpLocation + * @property {google.protobuf.ITimestamp|null} [flpUpdateTime] DeliveryVehicleLocation flpUpdateTime + * @property {google.protobuf.IDoubleValue|null} [flpLatlngAccuracyMeters] DeliveryVehicleLocation flpLatlngAccuracyMeters + * @property {google.protobuf.IInt32Value|null} [flpHeadingDegrees] DeliveryVehicleLocation flpHeadingDegrees * @property {google.type.ILatLng|null} [supplementalLocation] DeliveryVehicleLocation supplementalLocation * @property {google.protobuf.ITimestamp|null} [supplementalLocationTime] DeliveryVehicleLocation supplementalLocationTime * @property {maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor|null} [supplementalLocationSensor] DeliveryVehicleLocation supplementalLocationSensor @@ -630,6 +634,38 @@ */ DeliveryVehicleLocation.prototype.rawLocationAccuracy = null; + /** + * DeliveryVehicleLocation flpLocation. + * @member {google.type.ILatLng|null|undefined} flpLocation + * @memberof maps.fleetengine.delivery.v1.DeliveryVehicleLocation + * @instance + */ + DeliveryVehicleLocation.prototype.flpLocation = null; + + /** + * DeliveryVehicleLocation flpUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} flpUpdateTime + * @memberof maps.fleetengine.delivery.v1.DeliveryVehicleLocation + * @instance + */ + DeliveryVehicleLocation.prototype.flpUpdateTime = null; + + /** + * DeliveryVehicleLocation flpLatlngAccuracyMeters. + * @member {google.protobuf.IDoubleValue|null|undefined} flpLatlngAccuracyMeters + * @memberof maps.fleetengine.delivery.v1.DeliveryVehicleLocation + * @instance + */ + DeliveryVehicleLocation.prototype.flpLatlngAccuracyMeters = null; + + /** + * DeliveryVehicleLocation flpHeadingDegrees. + * @member {google.protobuf.IInt32Value|null|undefined} flpHeadingDegrees + * @memberof maps.fleetengine.delivery.v1.DeliveryVehicleLocation + * @instance + */ + DeliveryVehicleLocation.prototype.flpHeadingDegrees = null; + /** * DeliveryVehicleLocation supplementalLocation. * @member {google.type.ILatLng|null|undefined} supplementalLocation @@ -750,6 +786,14 @@ $root.google.protobuf.BoolValue.encode(message.isRoadSnapped, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); if (message.rawLocationSensor != null && Object.hasOwnProperty.call(message, "rawLocationSensor")) writer.uint32(/* id 28, wireType 0 =*/224).int32(message.rawLocationSensor); + if (message.flpLocation != null && Object.hasOwnProperty.call(message, "flpLocation")) + $root.google.type.LatLng.encode(message.flpLocation, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.flpUpdateTime != null && Object.hasOwnProperty.call(message, "flpUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.flpUpdateTime, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.flpLatlngAccuracyMeters != null && Object.hasOwnProperty.call(message, "flpLatlngAccuracyMeters")) + $root.google.protobuf.DoubleValue.encode(message.flpLatlngAccuracyMeters, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.flpHeadingDegrees != null && Object.hasOwnProperty.call(message, "flpHeadingDegrees")) + $root.google.protobuf.Int32Value.encode(message.flpHeadingDegrees, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); return writer; }; @@ -878,6 +922,22 @@ message.rawLocationAccuracy = $root.google.protobuf.DoubleValue.decode(reader, reader.uint32()); break; } + case 29: { + message.flpLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 30: { + message.flpUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 31: { + message.flpLatlngAccuracyMeters = $root.google.protobuf.DoubleValue.decode(reader, reader.uint32()); + break; + } + case 32: { + message.flpHeadingDegrees = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); + break; + } case 18: { message.supplementalLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); break; @@ -1068,6 +1128,26 @@ if (error) return "rawLocationAccuracy." + error; } + if (message.flpLocation != null && message.hasOwnProperty("flpLocation")) { + var error = $root.google.type.LatLng.verify(message.flpLocation); + if (error) + return "flpLocation." + error; + } + if (message.flpUpdateTime != null && message.hasOwnProperty("flpUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.flpUpdateTime); + if (error) + return "flpUpdateTime." + error; + } + if (message.flpLatlngAccuracyMeters != null && message.hasOwnProperty("flpLatlngAccuracyMeters")) { + var error = $root.google.protobuf.DoubleValue.verify(message.flpLatlngAccuracyMeters); + if (error) + return "flpLatlngAccuracyMeters." + error; + } + if (message.flpHeadingDegrees != null && message.hasOwnProperty("flpHeadingDegrees")) { + var error = $root.google.protobuf.Int32Value.verify(message.flpHeadingDegrees); + if (error) + return "flpHeadingDegrees." + error; + } if (message.supplementalLocation != null && message.hasOwnProperty("supplementalLocation")) { var error = $root.google.type.LatLng.verify(message.supplementalLocation); if (error) @@ -1309,6 +1389,26 @@ throw TypeError(".maps.fleetengine.delivery.v1.DeliveryVehicleLocation.rawLocationAccuracy: object expected"); message.rawLocationAccuracy = $root.google.protobuf.DoubleValue.fromObject(object.rawLocationAccuracy); } + if (object.flpLocation != null) { + if (typeof object.flpLocation !== "object") + throw TypeError(".maps.fleetengine.delivery.v1.DeliveryVehicleLocation.flpLocation: object expected"); + message.flpLocation = $root.google.type.LatLng.fromObject(object.flpLocation); + } + if (object.flpUpdateTime != null) { + if (typeof object.flpUpdateTime !== "object") + throw TypeError(".maps.fleetengine.delivery.v1.DeliveryVehicleLocation.flpUpdateTime: object expected"); + message.flpUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.flpUpdateTime); + } + if (object.flpLatlngAccuracyMeters != null) { + if (typeof object.flpLatlngAccuracyMeters !== "object") + throw TypeError(".maps.fleetengine.delivery.v1.DeliveryVehicleLocation.flpLatlngAccuracyMeters: object expected"); + message.flpLatlngAccuracyMeters = $root.google.protobuf.DoubleValue.fromObject(object.flpLatlngAccuracyMeters); + } + if (object.flpHeadingDegrees != null) { + if (typeof object.flpHeadingDegrees !== "object") + throw TypeError(".maps.fleetengine.delivery.v1.DeliveryVehicleLocation.flpHeadingDegrees: object expected"); + message.flpHeadingDegrees = $root.google.protobuf.Int32Value.fromObject(object.flpHeadingDegrees); + } if (object.supplementalLocation != null) { if (typeof object.supplementalLocation !== "object") throw TypeError(".maps.fleetengine.delivery.v1.DeliveryVehicleLocation.supplementalLocation: object expected"); @@ -1415,6 +1515,10 @@ object.roadSnapped = false; object.isRoadSnapped = null; object.rawLocationSensor = options.enums === String ? "UNKNOWN_SENSOR" : 0; + object.flpLocation = null; + object.flpUpdateTime = null; + object.flpLatlngAccuracyMeters = null; + object.flpHeadingDegrees = null; } if (message.location != null && message.hasOwnProperty("location")) object.location = $root.google.type.LatLng.toObject(message.location, options); @@ -1472,6 +1576,14 @@ object.isRoadSnapped = $root.google.protobuf.BoolValue.toObject(message.isRoadSnapped, options); if (message.rawLocationSensor != null && message.hasOwnProperty("rawLocationSensor")) object.rawLocationSensor = options.enums === String ? $root.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor[message.rawLocationSensor] === undefined ? message.rawLocationSensor : $root.maps.fleetengine.delivery.v1.DeliveryVehicleLocationSensor[message.rawLocationSensor] : message.rawLocationSensor; + if (message.flpLocation != null && message.hasOwnProperty("flpLocation")) + object.flpLocation = $root.google.type.LatLng.toObject(message.flpLocation, options); + if (message.flpUpdateTime != null && message.hasOwnProperty("flpUpdateTime")) + object.flpUpdateTime = $root.google.protobuf.Timestamp.toObject(message.flpUpdateTime, options); + if (message.flpLatlngAccuracyMeters != null && message.hasOwnProperty("flpLatlngAccuracyMeters")) + object.flpLatlngAccuracyMeters = $root.google.protobuf.DoubleValue.toObject(message.flpLatlngAccuracyMeters, options); + if (message.flpHeadingDegrees != null && message.hasOwnProperty("flpHeadingDegrees")) + object.flpHeadingDegrees = $root.google.protobuf.Int32Value.toObject(message.flpHeadingDegrees, options); return object; }; @@ -12707,6 +12819,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -12741,6 +12854,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -12773,6 +12894,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -12824,6 +12947,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -12875,6 +13002,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -12917,6 +13049,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -12935,8 +13072,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -12944,6 +13083,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -14766,6 +14907,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -14791,6 +14933,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -14817,6 +14967,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -14857,6 +15009,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -14897,6 +15053,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -14917,6 +15078,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -14933,10 +15099,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -14966,6 +15136,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -15842,6 +16264,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -15853,6 +16276,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15867,6 +16291,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -15893,6 +16325,9 @@ 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(); return writer; }; @@ -15923,7 +16358,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -15933,6 +16368,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -15973,12 +16431,20 @@ 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 + 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"; + } + 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 @@ -15993,6 +16459,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -16009,10 +16482,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -16651,6 +17132,251 @@ return values; })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + /** * LaunchStage enum. * @name google.api.LaunchStage @@ -18063,6 +18789,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -18077,6 +18804,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -18101,6 +18829,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -18123,6 +18852,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -18173,6 +18903,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -18294,6 +19032,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -18366,6 +19107,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -18468,6 +19215,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -18522,6 +19276,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -18574,6 +19329,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -18637,6 +19399,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -18702,6 +19468,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -18758,6 +19525,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -18806,6 +19578,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -18911,6 +19684,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -18963,6 +19744,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -19055,6 +19838,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -19168,6 +19955,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -19267,6 +20063,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -19296,6 +20112,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -19341,6 +20158,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -21385,6 +22204,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -21445,6 +22265,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -21482,6 +22310,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -21544,6 +22374,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -21612,6 +22446,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -21661,6 +22504,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -21685,6 +22548,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -21705,6 +22569,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -24023,6 +24889,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -24143,6 +25010,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -24217,6 +25092,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -24318,6 +25195,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -24453,6 +25334,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -24641,6 +25527,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -24738,6 +25629,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -24770,6 +25662,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -25042,6 +25936,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -25083,6 +25978,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -25182,14 +26081,496 @@ return EditionDefault; })(); - return FieldOptions; - })(); + FieldOptions.FeatureSupport = (function() { - protobuf.OneofOptions = (function() { + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ - /** - * Properties of an OneofOptions. - * @memberof google.protobuf + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + + 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 @@ -25774,6 +27155,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -25817,6 +27199,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -25855,6 +27245,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -25906,6 +27298,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -25958,6 +27354,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -25991,6 +27392,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -26023,6 +27429,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -26030,6 +27437,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -27497,6 +28906,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -27562,6 +28973,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -27598,6 +29025,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -27658,6 +29089,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -27748,6 +29187,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -27887,6 +29346,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -27910,6 +29417,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -27923,6 +29432,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -28050,6 +29563,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -28234,6 +29960,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -28251,6 +29978,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -28299,6 +30027,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -28351,6 +30083,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -28459,7 +30195,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -28486,12 +30223,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -28517,10 +30262,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -28561,8 +30308,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -28605,6 +30356,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -28617,10 +30369,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); if (error) - return "features." + error; + return "fixedFeatures." + error; } return null; }; @@ -28648,6 +30405,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -28689,10 +30450,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -28711,13 +30477,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -29932,6 +31701,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Timestamp = (function() { /** diff --git a/packages/google-maps-fleetengine-delivery/protos/protos.json b/packages/google-maps-fleetengine-delivery/protos/protos.json index 398c22855b9f..3b139b9d8069 100644 --- a/packages/google-maps-fleetengine-delivery/protos/protos.json +++ b/packages/google-maps-fleetengine-delivery/protos/protos.json @@ -172,6 +172,22 @@ "type": "google.protobuf.DoubleValue", "id": 25 }, + "flpLocation": { + "type": "google.type.LatLng", + "id": 29 + }, + "flpUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 30 + }, + "flpLatlngAccuracyMeters": { + "type": "google.protobuf.DoubleValue", + "id": 31 + }, + "flpHeadingDegrees": { + "type": "google.protobuf.Int32Value", + "id": 32 + }, "supplementalLocation": { "type": "google.type.LatLng", "id": 18 @@ -1557,8 +1573,7 @@ "java_multiple_files": true, "java_outer_classname": "RoutingProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "fieldBehavior": { @@ -1704,6 +1719,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -1844,6 +1863,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -1901,6 +1942,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -1962,6 +2008,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -2098,12 +2157,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -2142,6 +2208,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -2230,6 +2301,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -2455,6 +2530,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -2669,6 +2748,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -2804,7 +2884,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -2832,6 +2913,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -2901,6 +2986,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -2989,6 +3094,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3131,6 +3240,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -3141,6 +3251,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -3151,6 +3262,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -3161,6 +3273,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -3171,7 +3284,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -3181,27 +3295,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -3246,7 +3371,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -3261,6 +3392,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -3288,11 +3446,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -3305,6 +3478,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -3390,6 +3569,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Timestamp": { "fields": { "seconds": { diff --git a/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json b/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json index f677ad447436..e241cf6d7a2f 100644 --- a/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json +++ b/packages/google-maps-fleetengine-delivery/samples/generated/v1/snippet_metadata_maps.fleetengine.delivery.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-delivery", - "version": "0.5.0", + "version": "0.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-fleetengine-delivery/samples/package.json b/packages/google-maps-fleetengine-delivery/samples/package.json index d74dd7349696..44c80888d4e3 100644 --- a/packages/google-maps-fleetengine-delivery/samples/package.json +++ b/packages/google-maps-fleetengine-delivery/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/fleetengine-delivery": "^0.5.0" + "@googlemaps/fleetengine-delivery": "^0.6.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-fleetengine/.readme-partials.yaml b/packages/google-maps-fleetengine/.readme-partials.yaml new file mode 100644 index 000000000000..a400803fed03 --- /dev/null +++ b/packages/google-maps-fleetengine/.readme-partials.yaml @@ -0,0 +1,23 @@ +body: |- + ## Terms of Service + + `@googlemaps/fleetengine` uses Google Maps Platform services. Use of Google + Maps Platform services through this library is subject to the + [Google Maps Platform Terms of Service][gmp-tos]. + + This library is not a Google Maps Platform Core Service. + Therefore, the Google Maps Platform Terms of Service (e.g., Technical + Support Services, Service Level Agreements, and Deprecation Policy) + do not apply to this library. + + ### European Economic Area (EEA) developers + + If your billing address is in the European Economic Area, effective on + 8 July 2025, the [Google Maps Platform EEA Terms of Service][gmp-tos-eea] + will apply to your use of the Services. Functionality varies by region. + [Learn more][gmp-tos-eea-faq]. + + [gmp-tos]: https://cloud.google.com/maps-platform/terms + [gmp-tos-eea]: https://cloud.google.com/terms/maps-platform/eea + [gmp-tos-eea-faq]: https://developers.google.com/maps/comms/eea/faq + diff --git a/packages/google-maps-fleetengine/CHANGELOG.md b/packages/google-maps-fleetengine/CHANGELOG.md index b8d967c945c0..01c0f83601ed 100644 --- a/packages/google-maps-fleetengine/CHANGELOG.md +++ b/packages/google-maps-fleetengine/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.8.0](https://github.com/googleapis/google-cloud-node/compare/fleetengine-v0.7.0...fleetengine-v0.8.0) (2025-07-17) + + +### Features + +* [fleetengine] add ability to specify trip attributes to Trip and deprecate Trip.remaining_waypoints_version ([#6481](https://github.com/googleapis/google-cloud-node/issues/6481)) ([ebf2538](https://github.com/googleapis/google-cloud-node/commit/ebf2538352a7b9bf92f100ff1cabdb9ab58e1c4d)) + ## [0.7.0](https://github.com/googleapis/google-cloud-node/compare/fleetengine-v0.6.1...fleetengine-v0.7.0) (2025-07-09) diff --git a/packages/google-maps-fleetengine/package.json b/packages/google-maps-fleetengine/package.json index 1ada60d0c374..8de4a9afd17d 100644 --- a/packages/google-maps-fleetengine/package.json +++ b/packages/google-maps-fleetengine/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/fleetengine", - "version": "0.7.0", + "version": "0.8.0", "description": "Local Rides and Deliveries API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/fleetengine.proto b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/fleetengine.proto index 2835a1d549d8..426190db6b38 100644 --- a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/fleetengine.proto +++ b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/fleetengine.proto @@ -282,6 +282,19 @@ message VehicleLocation { // Accuracy of `raw_location` as a radius, in meters. google.protobuf.DoubleValue raw_location_accuracy = 25; + // The location from Android's Fused Location Provider. + google.type.LatLng flp_location = 29; + + // Update timestamp of `flp_location`. + google.protobuf.Timestamp flp_update_time = 30; + + // Accuracy of `flp_location` in meters as a radius. + google.protobuf.DoubleValue flp_latlng_accuracy_meters = 31; + + // Direction the vehicle is moving in degrees, as determined by the Fused + // Location Provider. 0 represents North. The valid range is [0,360). + google.protobuf.Int32Value flp_heading_degrees = 32; + // Supplemental location provided by the integrating app. google.type.LatLng supplemental_location = 18; @@ -335,3 +348,22 @@ enum LocationSensor { // The location provider on Apple operating systems. CORE_LOCATION = 200; } + +// Describes a trip attribute as a key-value pair. The "key:value" string length +// cannot exceed 256 characters. +message TripAttribute { + // The attribute's key. Keys may not contain the colon character (:). + string key = 1; + + // The attribute's value, can be in string, bool, or double type. + oneof trip_attribute_value { + // String typed attribute value. + string string_value = 2; + + // Boolean typed attribute value. + bool bool_value = 3; + + // Double typed attribute value. + double number_value = 4; + } +} diff --git a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/traffic.proto b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/traffic.proto index ae1c9dc55c1e..03312c25739b 100644 --- a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/traffic.proto +++ b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/traffic.proto @@ -34,13 +34,13 @@ message SpeedReadingInterval { // Default value. This value is unused. SPEED_UNSPECIFIED = 0; - // Normal speed, no slowdown is detected. + // Normal speed, no traffic delays. NORMAL = 1; - // Slowdown detected, but no traffic jam formed. + // Slowdown detected, medium amount of traffic. SLOW = 2; - // Traffic jam detected. + // Traffic delays. TRAFFIC_JAM = 3; } diff --git a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trip_api.proto b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trip_api.proto index 25b4de21e8bc..4f707bb6e5e2 100644 --- a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trip_api.proto +++ b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trip_api.proto @@ -222,11 +222,11 @@ message GetTripRequest { // If a minimum is unspecified, the route data are always retrieved. google.protobuf.Timestamp current_route_segment_version = 6; - // Indicates the minimum timestamp (exclusive) for which - // `Trip.remaining_waypoints` are retrieved. If they are unchanged since this - // timestamp, the `remaining_waypoints` are not set in the response. If this - // field is unspecified, `remaining_waypoints` is always retrieved. - google.protobuf.Timestamp remaining_waypoints_version = 7; + // Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + // `remaining_waypoints_route_version` to control when + // `Trip.remaining_waypoints.traffic_to_waypoint` and + // `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. + google.protobuf.Timestamp remaining_waypoints_version = 7 [deprecated = true]; // The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), // or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default diff --git a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trips.proto b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trips.proto index ef6a69a6464e..ea4874937048 100644 --- a/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trips.proto +++ b/packages/google-maps-fleetengine/protos/google/maps/fleetengine/v1/trips.proto @@ -224,6 +224,9 @@ message Trip { // The subset of Trip fields that are populated and how they should be // interpreted. TripView view = 31; + + // A list of custom Trip attributes. Each attribute must have a unique key. + repeated TripAttribute attributes = 35; } // The actual location where a stop (pickup/dropoff) happened. diff --git a/packages/google-maps-fleetengine/protos/protos.d.ts b/packages/google-maps-fleetengine/protos/protos.d.ts index 0d36150256a9..4c9b312111a1 100644 --- a/packages/google-maps-fleetengine/protos/protos.d.ts +++ b/packages/google-maps-fleetengine/protos/protos.d.ts @@ -628,6 +628,18 @@ export namespace maps { /** VehicleLocation rawLocationAccuracy */ rawLocationAccuracy?: (google.protobuf.IDoubleValue|null); + /** VehicleLocation flpLocation */ + flpLocation?: (google.type.ILatLng|null); + + /** VehicleLocation flpUpdateTime */ + flpUpdateTime?: (google.protobuf.ITimestamp|null); + + /** VehicleLocation flpLatlngAccuracyMeters */ + flpLatlngAccuracyMeters?: (google.protobuf.IDoubleValue|null); + + /** VehicleLocation flpHeadingDegrees */ + flpHeadingDegrees?: (google.protobuf.IInt32Value|null); + /** VehicleLocation supplementalLocation */ supplementalLocation?: (google.type.ILatLng|null); @@ -722,6 +734,18 @@ export namespace maps { /** VehicleLocation rawLocationAccuracy. */ public rawLocationAccuracy?: (google.protobuf.IDoubleValue|null); + /** VehicleLocation flpLocation. */ + public flpLocation?: (google.type.ILatLng|null); + + /** VehicleLocation flpUpdateTime. */ + public flpUpdateTime?: (google.protobuf.ITimestamp|null); + + /** VehicleLocation flpLatlngAccuracyMeters. */ + public flpLatlngAccuracyMeters?: (google.protobuf.IDoubleValue|null); + + /** VehicleLocation flpHeadingDegrees. */ + public flpHeadingDegrees?: (google.protobuf.IInt32Value|null); + /** VehicleLocation supplementalLocation. */ public supplementalLocation?: (google.type.ILatLng|null); @@ -828,6 +852,124 @@ export namespace maps { CORE_LOCATION = 200 } + /** Properties of a TripAttribute. */ + interface ITripAttribute { + + /** TripAttribute key */ + key?: (string|null); + + /** TripAttribute stringValue */ + stringValue?: (string|null); + + /** TripAttribute boolValue */ + boolValue?: (boolean|null); + + /** TripAttribute numberValue */ + numberValue?: (number|null); + } + + /** Represents a TripAttribute. */ + class TripAttribute implements ITripAttribute { + + /** + * Constructs a new TripAttribute. + * @param [properties] Properties to set + */ + constructor(properties?: maps.fleetengine.v1.ITripAttribute); + + /** TripAttribute key. */ + public key: string; + + /** TripAttribute stringValue. */ + public stringValue?: (string|null); + + /** TripAttribute boolValue. */ + public boolValue?: (boolean|null); + + /** TripAttribute numberValue. */ + public numberValue?: (number|null); + + /** TripAttribute tripAttributeValue. */ + public tripAttributeValue?: ("stringValue"|"boolValue"|"numberValue"); + + /** + * Creates a new TripAttribute instance using the specified properties. + * @param [properties] Properties to set + * @returns TripAttribute instance + */ + public static create(properties?: maps.fleetengine.v1.ITripAttribute): maps.fleetengine.v1.TripAttribute; + + /** + * Encodes the specified TripAttribute message. Does not implicitly {@link maps.fleetengine.v1.TripAttribute.verify|verify} messages. + * @param message TripAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: maps.fleetengine.v1.ITripAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TripAttribute message, length delimited. Does not implicitly {@link maps.fleetengine.v1.TripAttribute.verify|verify} messages. + * @param message TripAttribute message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: maps.fleetengine.v1.ITripAttribute, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TripAttribute message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TripAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): maps.fleetengine.v1.TripAttribute; + + /** + * Decodes a TripAttribute message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TripAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): maps.fleetengine.v1.TripAttribute; + + /** + * Verifies a TripAttribute message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TripAttribute message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TripAttribute + */ + public static fromObject(object: { [k: string]: any }): maps.fleetengine.v1.TripAttribute; + + /** + * Creates a plain object from a TripAttribute message. Also converts values to other types if specified. + * @param message TripAttribute + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: maps.fleetengine.v1.TripAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TripAttribute to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TripAttribute + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a SpeedReadingInterval. */ interface ISpeedReadingInterval { @@ -2322,6 +2464,9 @@ export namespace maps { /** Trip view */ view?: (maps.fleetengine.v1.TripView|keyof typeof maps.fleetengine.v1.TripView|null); + + /** Trip attributes */ + attributes?: (maps.fleetengine.v1.ITripAttribute[]|null); } /** Represents a Trip. */ @@ -2432,6 +2577,9 @@ export namespace maps { /** Trip view. */ public view: (maps.fleetengine.v1.TripView|keyof typeof maps.fleetengine.v1.TripView); + /** Trip attributes. */ + public attributes: maps.fleetengine.v1.ITripAttribute[]; + /** * Creates a new Trip instance using the specified properties. * @param [properties] Properties to set @@ -6331,6 +6479,9 @@ export namespace google { /** CommonLanguageSettings destinations */ destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); } /** Represents a CommonLanguageSettings. */ @@ -6348,6 +6499,9 @@ export namespace google { /** CommonLanguageSettings destinations. */ public destinations: google.api.ClientLibraryDestination[]; + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @param [properties] Properties to set @@ -7048,6 +7202,9 @@ export namespace google { /** PythonSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); } /** Represents a PythonSettings. */ @@ -7062,6 +7219,9 @@ export namespace google { /** PythonSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + /** * Creates a new PythonSettings instance using the specified properties. * @param [properties] Properties to set @@ -7140,6 +7300,118 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not 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.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload 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.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @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 { @@ -7466,6 +7738,9 @@ export namespace google { /** GoSettings common */ common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); } /** Represents a GoSettings. */ @@ -7480,6 +7755,9 @@ export namespace google { /** GoSettings common. */ public common?: (google.api.ICommonLanguageSettings|null); + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + /** * Creates a new GoSettings instance using the specified properties. * @param [properties] Properties to set @@ -7804,6 +8082,109 @@ export namespace google { PACKAGE_MANAGER = 20 } + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not 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.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload 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.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** LaunchStage enum. */ enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, @@ -8120,6 +8501,7 @@ export namespace google { /** Edition enum. */ enum Edition { EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, @@ -8150,6 +8532,9 @@ export namespace google { /** FileDescriptorProto weakDependency */ weakDependency?: (number[]|null); + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + /** FileDescriptorProto messageType */ messageType?: (google.protobuf.IDescriptorProto[]|null); @@ -8199,6 +8584,9 @@ export namespace google { /** FileDescriptorProto weakDependency. */ public weakDependency: number[]; + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + /** FileDescriptorProto messageType. */ public messageType: google.protobuf.IDescriptorProto[]; @@ -8333,6 +8721,9 @@ export namespace google { /** DescriptorProto reservedName */ reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents a DescriptorProto. */ @@ -8374,6 +8765,9 @@ export namespace google { /** DescriptorProto reservedName. */ public reservedName: string[]; + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new DescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -9221,6 +9615,9 @@ export namespace google { /** EnumDescriptorProto reservedName */ reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); } /** Represents an EnumDescriptorProto. */ @@ -9247,6 +9644,9 @@ export namespace google { /** EnumDescriptorProto reservedName. */ public reservedName: string[]; + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @param [properties] Properties to set @@ -10181,6 +10581,9 @@ export namespace google { /** FieldOptions features */ features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); @@ -10236,6 +10639,9 @@ export namespace google { /** FieldOptions features. */ public features?: (google.protobuf.IFeatureSet|null); + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** FieldOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -10456,6 +10862,121 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a 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.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is 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.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** Properties of an OneofOptions. */ @@ -10694,6 +11215,9 @@ export namespace google { /** EnumValueOptions debugRedact */ debugRedact?: (boolean|null); + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption */ uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } @@ -10716,6 +11240,9 @@ export namespace google { /** EnumValueOptions debugRedact. */ public debugRedact: boolean; + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + /** EnumValueOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; @@ -11308,6 +11835,12 @@ export namespace google { /** FeatureSet jsonFormat */ jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); } /** Represents a FeatureSet. */ @@ -11337,6 +11870,12 @@ export namespace google { /** FeatureSet jsonFormat. */ public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + /** * Creates a new FeatureSet instance using the specified properties. * @param [properties] Properties to set @@ -11459,6 +11998,116 @@ export namespace google { ALLOW = 1, LEGACY_BEST_EFFORT = 2 } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a 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.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is 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.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } } /** Properties of a FeatureSetDefaults. */ @@ -11578,8 +12227,11 @@ export namespace google { /** FeatureSetEditionDefault edition */ edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - /** FeatureSetEditionDefault features */ - features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); } /** Represents a FeatureSetEditionDefault. */ @@ -11594,8 +12246,11 @@ export namespace google { /** FeatureSetEditionDefault edition. */ public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - /** FeatureSetEditionDefault features. */ - public features?: (google.protobuf.IFeatureSet|null); + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -12128,6 +12783,13 @@ export namespace google { } } + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + /** Properties of a Duration. */ interface IDuration { diff --git a/packages/google-maps-fleetengine/protos/protos.js b/packages/google-maps-fleetengine/protos/protos.js index 03c47ffe7b0f..4b64ffdb8844 100644 --- a/packages/google-maps-fleetengine/protos/protos.js +++ b/packages/google-maps-fleetengine/protos/protos.js @@ -1564,6 +1564,10 @@ * @property {google.protobuf.ITimestamp|null} [rawLocationTime] VehicleLocation rawLocationTime * @property {maps.fleetengine.v1.LocationSensor|null} [rawLocationSensor] VehicleLocation rawLocationSensor * @property {google.protobuf.IDoubleValue|null} [rawLocationAccuracy] VehicleLocation rawLocationAccuracy + * @property {google.type.ILatLng|null} [flpLocation] VehicleLocation flpLocation + * @property {google.protobuf.ITimestamp|null} [flpUpdateTime] VehicleLocation flpUpdateTime + * @property {google.protobuf.IDoubleValue|null} [flpLatlngAccuracyMeters] VehicleLocation flpLatlngAccuracyMeters + * @property {google.protobuf.IInt32Value|null} [flpHeadingDegrees] VehicleLocation flpHeadingDegrees * @property {google.type.ILatLng|null} [supplementalLocation] VehicleLocation supplementalLocation * @property {google.protobuf.ITimestamp|null} [supplementalLocationTime] VehicleLocation supplementalLocationTime * @property {maps.fleetengine.v1.LocationSensor|null} [supplementalLocationSensor] VehicleLocation supplementalLocationSensor @@ -1770,6 +1774,38 @@ */ VehicleLocation.prototype.rawLocationAccuracy = null; + /** + * VehicleLocation flpLocation. + * @member {google.type.ILatLng|null|undefined} flpLocation + * @memberof maps.fleetengine.v1.VehicleLocation + * @instance + */ + VehicleLocation.prototype.flpLocation = null; + + /** + * VehicleLocation flpUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} flpUpdateTime + * @memberof maps.fleetengine.v1.VehicleLocation + * @instance + */ + VehicleLocation.prototype.flpUpdateTime = null; + + /** + * VehicleLocation flpLatlngAccuracyMeters. + * @member {google.protobuf.IDoubleValue|null|undefined} flpLatlngAccuracyMeters + * @memberof maps.fleetengine.v1.VehicleLocation + * @instance + */ + VehicleLocation.prototype.flpLatlngAccuracyMeters = null; + + /** + * VehicleLocation flpHeadingDegrees. + * @member {google.protobuf.IInt32Value|null|undefined} flpHeadingDegrees + * @memberof maps.fleetengine.v1.VehicleLocation + * @instance + */ + VehicleLocation.prototype.flpHeadingDegrees = null; + /** * VehicleLocation supplementalLocation. * @member {google.type.ILatLng|null|undefined} supplementalLocation @@ -1890,6 +1926,14 @@ $root.google.protobuf.BoolValue.encode(message.isRoadSnapped, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); if (message.rawLocationSensor != null && Object.hasOwnProperty.call(message, "rawLocationSensor")) writer.uint32(/* id 28, wireType 0 =*/224).int32(message.rawLocationSensor); + if (message.flpLocation != null && Object.hasOwnProperty.call(message, "flpLocation")) + $root.google.type.LatLng.encode(message.flpLocation, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim(); + if (message.flpUpdateTime != null && Object.hasOwnProperty.call(message, "flpUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.flpUpdateTime, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); + if (message.flpLatlngAccuracyMeters != null && Object.hasOwnProperty.call(message, "flpLatlngAccuracyMeters")) + $root.google.protobuf.DoubleValue.encode(message.flpLatlngAccuracyMeters, writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); + if (message.flpHeadingDegrees != null && Object.hasOwnProperty.call(message, "flpHeadingDegrees")) + $root.google.protobuf.Int32Value.encode(message.flpHeadingDegrees, writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); return writer; }; @@ -2018,6 +2062,22 @@ message.rawLocationAccuracy = $root.google.protobuf.DoubleValue.decode(reader, reader.uint32()); break; } + case 29: { + message.flpLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); + break; + } + case 30: { + message.flpUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 31: { + message.flpLatlngAccuracyMeters = $root.google.protobuf.DoubleValue.decode(reader, reader.uint32()); + break; + } + case 32: { + message.flpHeadingDegrees = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); + break; + } case 18: { message.supplementalLocation = $root.google.type.LatLng.decode(reader, reader.uint32()); break; @@ -2208,6 +2268,26 @@ if (error) return "rawLocationAccuracy." + error; } + if (message.flpLocation != null && message.hasOwnProperty("flpLocation")) { + var error = $root.google.type.LatLng.verify(message.flpLocation); + if (error) + return "flpLocation." + error; + } + if (message.flpUpdateTime != null && message.hasOwnProperty("flpUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.flpUpdateTime); + if (error) + return "flpUpdateTime." + error; + } + if (message.flpLatlngAccuracyMeters != null && message.hasOwnProperty("flpLatlngAccuracyMeters")) { + var error = $root.google.protobuf.DoubleValue.verify(message.flpLatlngAccuracyMeters); + if (error) + return "flpLatlngAccuracyMeters." + error; + } + if (message.flpHeadingDegrees != null && message.hasOwnProperty("flpHeadingDegrees")) { + var error = $root.google.protobuf.Int32Value.verify(message.flpHeadingDegrees); + if (error) + return "flpHeadingDegrees." + error; + } if (message.supplementalLocation != null && message.hasOwnProperty("supplementalLocation")) { var error = $root.google.type.LatLng.verify(message.supplementalLocation); if (error) @@ -2449,6 +2529,26 @@ throw TypeError(".maps.fleetengine.v1.VehicleLocation.rawLocationAccuracy: object expected"); message.rawLocationAccuracy = $root.google.protobuf.DoubleValue.fromObject(object.rawLocationAccuracy); } + if (object.flpLocation != null) { + if (typeof object.flpLocation !== "object") + throw TypeError(".maps.fleetengine.v1.VehicleLocation.flpLocation: object expected"); + message.flpLocation = $root.google.type.LatLng.fromObject(object.flpLocation); + } + if (object.flpUpdateTime != null) { + if (typeof object.flpUpdateTime !== "object") + throw TypeError(".maps.fleetengine.v1.VehicleLocation.flpUpdateTime: object expected"); + message.flpUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.flpUpdateTime); + } + if (object.flpLatlngAccuracyMeters != null) { + if (typeof object.flpLatlngAccuracyMeters !== "object") + throw TypeError(".maps.fleetengine.v1.VehicleLocation.flpLatlngAccuracyMeters: object expected"); + message.flpLatlngAccuracyMeters = $root.google.protobuf.DoubleValue.fromObject(object.flpLatlngAccuracyMeters); + } + if (object.flpHeadingDegrees != null) { + if (typeof object.flpHeadingDegrees !== "object") + throw TypeError(".maps.fleetengine.v1.VehicleLocation.flpHeadingDegrees: object expected"); + message.flpHeadingDegrees = $root.google.protobuf.Int32Value.fromObject(object.flpHeadingDegrees); + } if (object.supplementalLocation != null) { if (typeof object.supplementalLocation !== "object") throw TypeError(".maps.fleetengine.v1.VehicleLocation.supplementalLocation: object expected"); @@ -2555,6 +2655,10 @@ object.roadSnapped = false; object.isRoadSnapped = null; object.rawLocationSensor = options.enums === String ? "UNKNOWN_SENSOR" : 0; + object.flpLocation = null; + object.flpUpdateTime = null; + object.flpLatlngAccuracyMeters = null; + object.flpHeadingDegrees = null; } if (message.location != null && message.hasOwnProperty("location")) object.location = $root.google.type.LatLng.toObject(message.location, options); @@ -2612,6 +2716,14 @@ object.isRoadSnapped = $root.google.protobuf.BoolValue.toObject(message.isRoadSnapped, options); if (message.rawLocationSensor != null && message.hasOwnProperty("rawLocationSensor")) object.rawLocationSensor = options.enums === String ? $root.maps.fleetengine.v1.LocationSensor[message.rawLocationSensor] === undefined ? message.rawLocationSensor : $root.maps.fleetengine.v1.LocationSensor[message.rawLocationSensor] : message.rawLocationSensor; + if (message.flpLocation != null && message.hasOwnProperty("flpLocation")) + object.flpLocation = $root.google.type.LatLng.toObject(message.flpLocation, options); + if (message.flpUpdateTime != null && message.hasOwnProperty("flpUpdateTime")) + object.flpUpdateTime = $root.google.protobuf.Timestamp.toObject(message.flpUpdateTime, options); + if (message.flpLatlngAccuracyMeters != null && message.hasOwnProperty("flpLatlngAccuracyMeters")) + object.flpLatlngAccuracyMeters = $root.google.protobuf.DoubleValue.toObject(message.flpLatlngAccuracyMeters, options); + if (message.flpHeadingDegrees != null && message.hasOwnProperty("flpHeadingDegrees")) + object.flpHeadingDegrees = $root.google.protobuf.Int32Value.toObject(message.flpHeadingDegrees, options); return object; }; @@ -2672,6 +2784,311 @@ return values; })(); + v1.TripAttribute = (function() { + + /** + * Properties of a TripAttribute. + * @memberof maps.fleetengine.v1 + * @interface ITripAttribute + * @property {string|null} [key] TripAttribute key + * @property {string|null} [stringValue] TripAttribute stringValue + * @property {boolean|null} [boolValue] TripAttribute boolValue + * @property {number|null} [numberValue] TripAttribute numberValue + */ + + /** + * Constructs a new TripAttribute. + * @memberof maps.fleetengine.v1 + * @classdesc Represents a TripAttribute. + * @implements ITripAttribute + * @constructor + * @param {maps.fleetengine.v1.ITripAttribute=} [properties] Properties to set + */ + function TripAttribute(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TripAttribute key. + * @member {string} key + * @memberof maps.fleetengine.v1.TripAttribute + * @instance + */ + TripAttribute.prototype.key = ""; + + /** + * TripAttribute stringValue. + * @member {string|null|undefined} stringValue + * @memberof maps.fleetengine.v1.TripAttribute + * @instance + */ + TripAttribute.prototype.stringValue = null; + + /** + * TripAttribute boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof maps.fleetengine.v1.TripAttribute + * @instance + */ + TripAttribute.prototype.boolValue = null; + + /** + * TripAttribute numberValue. + * @member {number|null|undefined} numberValue + * @memberof maps.fleetengine.v1.TripAttribute + * @instance + */ + TripAttribute.prototype.numberValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TripAttribute tripAttributeValue. + * @member {"stringValue"|"boolValue"|"numberValue"|undefined} tripAttributeValue + * @memberof maps.fleetengine.v1.TripAttribute + * @instance + */ + Object.defineProperty(TripAttribute.prototype, "tripAttributeValue", { + get: $util.oneOfGetter($oneOfFields = ["stringValue", "boolValue", "numberValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TripAttribute instance using the specified properties. + * @function create + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {maps.fleetengine.v1.ITripAttribute=} [properties] Properties to set + * @returns {maps.fleetengine.v1.TripAttribute} TripAttribute instance + */ + TripAttribute.create = function create(properties) { + return new TripAttribute(properties); + }; + + /** + * Encodes the specified TripAttribute message. Does not implicitly {@link maps.fleetengine.v1.TripAttribute.verify|verify} messages. + * @function encode + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {maps.fleetengine.v1.ITripAttribute} message TripAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TripAttribute.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stringValue); + if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.boolValue); + if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) + writer.uint32(/* id 4, wireType 1 =*/33).double(message.numberValue); + return writer; + }; + + /** + * Encodes the specified TripAttribute message, length delimited. Does not implicitly {@link maps.fleetengine.v1.TripAttribute.verify|verify} messages. + * @function encodeDelimited + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {maps.fleetengine.v1.ITripAttribute} message TripAttribute message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TripAttribute.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TripAttribute message from the specified reader or buffer. + * @function decode + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {maps.fleetengine.v1.TripAttribute} TripAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TripAttribute.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.maps.fleetengine.v1.TripAttribute(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.stringValue = reader.string(); + break; + } + case 3: { + message.boolValue = reader.bool(); + break; + } + case 4: { + message.numberValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TripAttribute message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {maps.fleetengine.v1.TripAttribute} TripAttribute + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TripAttribute.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TripAttribute message. + * @function verify + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TripAttribute.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + properties.tripAttributeValue = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + if (properties.tripAttributeValue === 1) + return "tripAttributeValue: multiple values"; + properties.tripAttributeValue = 1; + if (typeof message.boolValue !== "boolean") + return "boolValue: boolean expected"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + if (properties.tripAttributeValue === 1) + return "tripAttributeValue: multiple values"; + properties.tripAttributeValue = 1; + if (typeof message.numberValue !== "number") + return "numberValue: number expected"; + } + return null; + }; + + /** + * Creates a TripAttribute message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {Object.} object Plain object + * @returns {maps.fleetengine.v1.TripAttribute} TripAttribute + */ + TripAttribute.fromObject = function fromObject(object) { + if (object instanceof $root.maps.fleetengine.v1.TripAttribute) + return object; + var message = new $root.maps.fleetengine.v1.TripAttribute(); + if (object.key != null) + message.key = String(object.key); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + return message; + }; + + /** + * Creates a plain object from a TripAttribute message. Also converts values to other types if specified. + * @function toObject + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {maps.fleetengine.v1.TripAttribute} message TripAttribute + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TripAttribute.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.tripAttributeValue = "stringValue"; + } + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.tripAttributeValue = "boolValue"; + } + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.tripAttributeValue = "numberValue"; + } + return object; + }; + + /** + * Converts this TripAttribute to JSON. + * @function toJSON + * @memberof maps.fleetengine.v1.TripAttribute + * @instance + * @returns {Object.} JSON object + */ + TripAttribute.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TripAttribute + * @function getTypeUrl + * @memberof maps.fleetengine.v1.TripAttribute + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TripAttribute.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/maps.fleetengine.v1.TripAttribute"; + }; + + return TripAttribute; + })(); + v1.SpeedReadingInterval = (function() { /** @@ -6286,6 +6703,7 @@ * @property {maps.fleetengine.v1.IVehicleLocation|null} [lastLocation] Trip lastLocation * @property {boolean|null} [lastLocationSnappable] Trip lastLocationSnappable * @property {maps.fleetengine.v1.TripView|null} [view] Trip view + * @property {Array.|null} [attributes] Trip attributes */ /** @@ -6303,6 +6721,7 @@ this.remainingWaypoints = []; this.vehicleWaypoints = []; this.route = []; + this.attributes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6573,6 +6992,14 @@ */ Trip.prototype.view = 0; + /** + * Trip attributes. + * @member {Array.} attributes + * @memberof maps.fleetengine.v1.Trip + * @instance + */ + Trip.prototype.attributes = $util.emptyArray; + /** * Creates a new Trip instance using the specified properties. * @function create @@ -6669,6 +7096,9 @@ if (message.actualIntermediateDestinations != null && message.actualIntermediateDestinations.length) for (var i = 0; i < message.actualIntermediateDestinations.length; ++i) $root.maps.fleetengine.v1.StopLocation.encode(message.actualIntermediateDestinations[i], writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.maps.fleetengine.v1.TripAttribute.encode(message.attributes[i], writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); return writer; }; @@ -6849,6 +7279,12 @@ message.view = reader.int32(); break; } + case 35: { + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.maps.fleetengine.v1.TripAttribute.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -7079,6 +7515,15 @@ case 2: break; } + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.maps.fleetengine.v1.TripAttribute.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } return null; }; @@ -7340,6 +7785,16 @@ message.view = 2; break; } + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".maps.fleetengine.v1.Trip.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".maps.fleetengine.v1.Trip.attributes: object expected"); + message.attributes[i] = $root.maps.fleetengine.v1.TripAttribute.fromObject(object.attributes[i]); + } + } return message; }; @@ -7363,6 +7818,7 @@ object.vehicleWaypoints = []; object.actualIntermediateDestinationArrivalPoints = []; object.actualIntermediateDestinations = []; + object.attributes = []; } if (options.defaults) { object.name = ""; @@ -7477,6 +7933,11 @@ for (var j = 0; j < message.actualIntermediateDestinations.length; ++j) object.actualIntermediateDestinations[j] = $root.maps.fleetengine.v1.StopLocation.toObject(message.actualIntermediateDestinations[j], options); } + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.maps.fleetengine.v1.TripAttribute.toObject(message.attributes[j], options); + } return object; }; @@ -18078,6 +18539,7 @@ * @interface ICommonLanguageSettings * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration */ /** @@ -18112,6 +18574,14 @@ */ CommonLanguageSettings.prototype.destinations = $util.emptyArray; + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + /** * Creates a new CommonLanguageSettings instance using the specified properties. * @function create @@ -18144,6 +18614,8 @@ writer.int32(message.destinations[i]); writer.ldelim(); } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -18195,6 +18667,10 @@ message.destinations.push(reader.int32()); break; } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -18246,6 +18722,11 @@ break; } } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } return null; }; @@ -18288,6 +18769,11 @@ break; } } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } return message; }; @@ -18306,8 +18792,10 @@ var object = {}; if (options.arrays || options.defaults) object.destinations = []; - if (options.defaults) + if (options.defaults) { object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) object.referenceDocsUri = message.referenceDocsUri; if (message.destinations && message.destinations.length) { @@ -18315,6 +18803,8 @@ 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.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); return object; }; @@ -20137,6 +20627,7 @@ * @memberof google.api * @interface IPythonSettings * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures */ /** @@ -20162,6 +20653,14 @@ */ PythonSettings.prototype.common = null; + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + /** * Creates a new PythonSettings instance using the specified properties. * @function create @@ -20188,6 +20687,8 @@ 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.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -20228,6 +20729,10 @@ message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20268,6 +20773,11 @@ if (error) return "common." + error; } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } return null; }; @@ -20288,6 +20798,11 @@ throw TypeError(".google.api.PythonSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } return message; }; @@ -20304,10 +20819,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.common = null; + object.experimentalFeatures = null; + } if (message.common != null && message.hasOwnProperty("common")) object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); return object; }; @@ -20337,6 +20856,258 @@ return typeUrlPrefix + "/google.api.PythonSettings"; }; + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + return PythonSettings; })(); @@ -21213,6 +21984,7 @@ * @memberof google.api * @interface IGoSettings * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices */ /** @@ -21224,6 +21996,7 @@ * @param {google.api.IGoSettings=} [properties] Properties to set */ function GoSettings(properties) { + this.renamedServices = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -21238,6 +22011,14 @@ */ GoSettings.prototype.common = null; + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + /** * Creates a new GoSettings instance using the specified properties. * @function create @@ -21264,6 +22045,9 @@ 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(); return writer; }; @@ -21294,7 +22078,7 @@ GoSettings.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -21304,6 +22088,29 @@ 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; + } default: reader.skipType(tag & 7); break; @@ -21344,6 +22151,14 @@ 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"; + } return null; }; @@ -21364,6 +22179,13 @@ throw TypeError(".google.api.GoSettings.common: object expected"); message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.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]]); + } return message; }; @@ -21380,10 +22202,18 @@ if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; 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]]; + } return object; }; @@ -22022,6 +22852,251 @@ return values; })(); + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + /** * LaunchStage enum. * @name google.api.LaunchStage @@ -22746,6 +23821,7 @@ * @name google.protobuf.Edition * @enum {number} * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY 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 @@ -22760,6 +23836,7 @@ protobuf.Edition = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; values[valuesById[998] = "EDITION_PROTO2"] = 998; values[valuesById[999] = "EDITION_PROTO3"] = 999; values[valuesById[1000] = "EDITION_2023"] = 1000; @@ -22784,6 +23861,7 @@ * @property {Array.|null} [dependency] FileDescriptorProto dependency * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency * @property {Array.|null} [messageType] FileDescriptorProto messageType * @property {Array.|null} [enumType] FileDescriptorProto enumType * @property {Array.|null} [service] FileDescriptorProto service @@ -22806,6 +23884,7 @@ this.dependency = []; this.publicDependency = []; this.weakDependency = []; + this.optionDependency = []; this.messageType = []; this.enumType = []; this.service = []; @@ -22856,6 +23935,14 @@ */ FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + /** * FileDescriptorProto messageType. * @member {Array.} messageType @@ -22977,6 +24064,9 @@ 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); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); return writer; }; @@ -23049,6 +24139,12 @@ message.weakDependency.push(reader.int32()); break; } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } case 4: { if (!(message.messageType && message.messageType.length)) message.messageType = []; @@ -23151,6 +24247,13 @@ if (!$util.isInteger(message.weakDependency[i])) return "weakDependency: integer[] expected"; } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } if (message.messageType != null && message.hasOwnProperty("messageType")) { if (!Array.isArray(message.messageType)) return "messageType: array expected"; @@ -23205,6 +24308,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -23257,6 +24361,13 @@ for (var i = 0; i < object.weakDependency.length; ++i) message.weakDependency[i] = object.weakDependency[i] | 0; } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } if (object.messageType) { if (!Array.isArray(object.messageType)) throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); @@ -23320,6 +24431,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -23385,6 +24500,7 @@ object.extension = []; object.publicDependency = []; object.weakDependency = []; + object.optionDependency = []; } if (options.defaults) { object.name = ""; @@ -23441,6 +24557,11 @@ 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; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } return object; }; @@ -23489,6 +24610,7 @@ * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options * @property {Array.|null} [reservedRange] DescriptorProto reservedRange * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility */ /** @@ -23594,6 +24716,14 @@ */ DescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + /** * Creates a new DescriptorProto instance using the specified properties. * @function create @@ -23646,6 +24776,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); return writer; }; @@ -23738,6 +24870,10 @@ message.reservedName.push(reader.string()); break; } + case 11: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -23851,6 +24987,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -23950,6 +25095,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -23979,6 +25144,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -24024,6 +25190,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -26068,6 +27236,7 @@ * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility */ /** @@ -26128,6 +27297,14 @@ */ EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + /** * Creates a new EnumDescriptorProto instance using the specified properties. * @function create @@ -26165,6 +27342,8 @@ 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]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); return writer; }; @@ -26227,6 +27406,10 @@ message.reservedName.push(reader.string()); break; } + case 6: { + message.visibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -26295,6 +27478,15 @@ if (!$util.isString(message.reservedName[i])) return "reservedName: string[] expected"; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -26344,6 +27536,26 @@ for (var i = 0; i < object.reservedName.length; ++i) message.reservedName[i] = String(object.reservedName[i]); } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } return message; }; @@ -26368,6 +27580,7 @@ if (options.defaults) { object.name = ""; object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -26388,6 +27601,8 @@ for (var j = 0; j < message.reservedName.length; ++j) object.reservedName[j] = message.reservedName[j]; } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; return object; }; @@ -28706,6 +29921,7 @@ * @property {Array.|null} [targets] FieldOptions targets * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport * @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 @@ -28826,6 +30042,14 @@ */ FieldOptions.prototype.features = null; + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + /** * FieldOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -28900,6 +30124,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).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(); @@ -29001,6 +30227,10 @@ message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -29136,6 +30366,11 @@ if (error) return "features." + error; } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -29324,6 +30559,11 @@ throw TypeError(".google.protobuf.FieldOptions.features: object expected"); message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); @@ -29421,6 +30661,7 @@ object.debugRedact = false; object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; object.features = null; + object.featureSupport = null; object[".google.api.resourceReference"] = null; } if (message.ctype != null && message.hasOwnProperty("ctype")) @@ -29453,6 +30694,8 @@ } if (message.features != null && message.hasOwnProperty("features")) object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -29725,6 +30968,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -29766,6 +31010,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -29865,6 +31113,488 @@ return EditionDefault; })(); + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + return FieldOptions; })(); @@ -30457,6 +32187,7 @@ * @property {boolean|null} [deprecated] EnumValueOptions deprecated * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ @@ -30500,6 +32231,14 @@ */ EnumValueOptions.prototype.debugRedact = false; + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + /** * EnumValueOptions uninterpretedOption. * @member {Array.} uninterpretedOption @@ -30538,6 +32277,8 @@ $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.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).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(); @@ -30589,6 +32330,10 @@ message.debugRedact = reader.bool(); break; } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } case 999: { if (!(message.uninterpretedOption && message.uninterpretedOption.length)) message.uninterpretedOption = []; @@ -30641,6 +32386,11 @@ if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) if (typeof message.debugRedact !== "boolean") return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { if (!Array.isArray(message.uninterpretedOption)) return "uninterpretedOption: array expected"; @@ -30674,6 +32424,11 @@ } if (object.debugRedact != null) message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); @@ -30706,6 +32461,7 @@ object.deprecated = false; object.features = null; object.debugRedact = false; + object.featureSupport = null; } if (message.deprecated != null && message.hasOwnProperty("deprecated")) object.deprecated = message.deprecated; @@ -30713,6 +32469,8 @@ object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) @@ -32180,6 +33938,8 @@ * @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 + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility */ /** @@ -32245,6 +34005,22 @@ */ FeatureSet.prototype.jsonFormat = 0; + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + /** * Creates a new FeatureSet instance using the specified properties. * @function create @@ -32281,6 +34057,10 @@ 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); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); return writer; }; @@ -32341,6 +34121,14 @@ message.jsonFormat = reader.int32(); break; } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -32431,6 +34219,26 @@ case 2: break; } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; @@ -32570,6 +34378,54 @@ message.jsonFormat = 2; break; } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } return message; }; @@ -32593,6 +34449,8 @@ 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; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_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; @@ -32606,6 +34464,10 @@ 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; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; return object; }; @@ -32733,6 +34595,219 @@ return values; })(); + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + return FeatureSet; })(); @@ -32917,6 +34992,7 @@ default: return "minimumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -32934,6 +35010,7 @@ default: return "maximumEdition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -32982,6 +35059,10 @@ case 0: message.minimumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.minimumEdition = 998; @@ -33034,6 +35115,10 @@ case 0: message.maximumEdition = 0; break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; case "EDITION_PROTO2": case 998: message.maximumEdition = 998; @@ -33142,7 +35227,8 @@ * @memberof google.protobuf.FeatureSetDefaults * @interface IFeatureSetEditionDefault * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures */ /** @@ -33169,12 +35255,20 @@ FeatureSetEditionDefault.prototype.edition = 0; /** - * FeatureSetEditionDefault features. - * @member {google.protobuf.IFeatureSet|null|undefined} features + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault * @instance */ - FeatureSetEditionDefault.prototype.features = null; + FeatureSetEditionDefault.prototype.fixedFeatures = null; /** * Creates a new FeatureSetEditionDefault instance using the specified properties. @@ -33200,10 +35294,12 @@ 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); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -33244,8 +35340,12 @@ message.edition = reader.int32(); break; } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); break; } default: @@ -33288,6 +35388,7 @@ default: return "edition: enum value expected"; case 0: + case 900: case 998: case 999: case 1000: @@ -33300,10 +35401,15 @@ case 2147483647: break; } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); if (error) - return "features." + error; + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); + if (error) + return "fixedFeatures." + error; } return null; }; @@ -33331,6 +35437,10 @@ case 0: message.edition = 0; break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; case "EDITION_PROTO2": case 998: message.edition = 998; @@ -33372,10 +35482,15 @@ 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); + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); } return message; }; @@ -33394,13 +35509,16 @@ options = {}; var object = {}; if (options.defaults) { - object.features = null; object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; } - 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; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); return object; }; @@ -34615,6 +36733,22 @@ return GeneratedCodeInfo; })(); + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + protobuf.Duration = (function() { /** diff --git a/packages/google-maps-fleetengine/protos/protos.json b/packages/google-maps-fleetengine/protos/protos.json index 68d5162f3c69..7b069d814286 100644 --- a/packages/google-maps-fleetengine/protos/protos.json +++ b/packages/google-maps-fleetengine/protos/protos.json @@ -315,6 +315,22 @@ "type": "google.protobuf.DoubleValue", "id": 25 }, + "flpLocation": { + "type": "google.type.LatLng", + "id": 29 + }, + "flpUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 30 + }, + "flpLatlngAccuracyMeters": { + "type": "google.protobuf.DoubleValue", + "id": 31 + }, + "flpHeadingDegrees": { + "type": "google.protobuf.Int32Value", + "id": 32 + }, "supplementalLocation": { "type": "google.type.LatLng", "id": 18 @@ -353,6 +369,35 @@ "CORE_LOCATION": 200 } }, + "TripAttribute": { + "oneofs": { + "tripAttributeValue": { + "oneof": [ + "stringValue", + "boolValue", + "numberValue" + ] + } + }, + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "stringValue": { + "type": "string", + "id": 2 + }, + "boolValue": { + "type": "bool", + "id": 3 + }, + "numberValue": { + "type": "double", + "id": 4 + } + } + }, "SpeedReadingInterval": { "fields": { "startPolylinePointIndex": { @@ -683,7 +728,10 @@ }, "remainingWaypointsVersion": { "type": "google.protobuf.Timestamp", - "id": 7 + "id": 7, + "options": { + "deprecated": true + } }, "routeFormatType": { "type": "PolylineFormatType", @@ -1046,6 +1094,11 @@ "view": { "type": "TripView", "id": 31 + }, + "attributes": { + "rule": "repeated", + "type": "TripAttribute", + "id": 35 } } }, @@ -2120,8 +2173,7 @@ "java_multiple_files": true, "java_outer_classname": "RoutingProto", "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true + "objc_class_prefix": "GAPI" }, "nested": { "fieldBehavior": { @@ -2344,6 +2396,10 @@ "rule": "repeated", "type": "ClientLibraryDestination", "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 } } }, @@ -2484,6 +2540,28 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } } } }, @@ -2541,6 +2619,11 @@ "common": { "type": "CommonLanguageSettings", "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 } } }, @@ -2602,6 +2685,19 @@ "PACKAGE_MANAGER": 20 } }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, "LaunchStage": { "values": { "LAUNCH_STAGE_UNSPECIFIED": 0, @@ -2661,12 +2757,19 @@ "type": "FileDescriptorProto", "id": 1 } - } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] }, "Edition": { "edition": "proto2", "values": { "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, "EDITION_PROTO2": 998, "EDITION_PROTO3": 999, "EDITION_2023": 1000, @@ -2705,6 +2808,11 @@ "type": "int32", "id": 11 }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, "messageType": { "rule": "repeated", "type": "DescriptorProto", @@ -2793,6 +2901,10 @@ "rule": "repeated", "type": "string", "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 } }, "nested": { @@ -3018,6 +3130,10 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 } }, "nested": { @@ -3232,6 +3348,7 @@ 42, 42 ], + "php_generic_services", [ 38, 38 @@ -3367,7 +3484,8 @@ "type": "bool", "id": 10, "options": { - "default": false + "default": false, + "deprecated": true } }, "debugRedact": { @@ -3395,6 +3513,10 @@ "type": "FeatureSet", "id": 21 }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3464,6 +3586,26 @@ "id": 2 } } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } } } }, @@ -3552,6 +3694,10 @@ "default": false } }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -3694,6 +3840,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_2023", "edition_defaults.value": "EXPLICIT" } @@ -3704,6 +3851,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "OPEN" } @@ -3714,6 +3862,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "PACKED" } @@ -3724,6 +3873,7 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "VERIFY" } @@ -3734,7 +3884,8 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", - "edition_defaults.edition": "EDITION_PROTO2", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", "edition_defaults.value": "LENGTH_PREFIXED" } }, @@ -3744,27 +3895,38 @@ "options": { "retention": "RETENTION_RUNTIME", "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", "edition_defaults.edition": "EDITION_PROTO3", "edition_defaults.value": "ALLOW" } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } } }, "extensions": [ [ 1000, - 1000 - ], - [ - 1001, - 1001 - ], - [ - 1002, - 1002 - ], - [ - 9990, - 9990 + 9994 ], [ 9995, @@ -3809,7 +3971,13 @@ "UTF8_VALIDATION_UNKNOWN": 0, "VERIFY": 2, "NONE": 3 - } + }, + "reserved": [ + [ + 1, + 1 + ] + ] }, "MessageEncoding": { "values": { @@ -3824,6 +3992,33 @@ "ALLOW": 1, "LEGACY_BEST_EFFORT": 2 } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } } } }, @@ -3851,11 +4046,26 @@ "type": "Edition", "id": 3 }, - "features": { + "overridableFeatures": { "type": "FeatureSet", - "id": 2 + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 } - } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] } } }, @@ -3868,6 +4078,12 @@ "id": 1 } }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], "nested": { "Location": { "fields": { @@ -3953,6 +4169,14 @@ } } }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, "Duration": { "fields": { "seconds": { diff --git a/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json b/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json index e0e9d7e23f65..8001c63d4c1e 100644 --- a/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json +++ b/packages/google-maps-fleetengine/samples/generated/v1/snippet_metadata_maps.fleetengine.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-fleetengine", - "version": "0.7.0", + "version": "0.8.0", "language": "TYPESCRIPT", "apis": [ { @@ -74,7 +74,7 @@ "segments": [ { "start": 25, - "end": 102, + "end": 95, "type": "FULL" } ], diff --git a/packages/google-maps-fleetengine/samples/generated/v1/trip_service.get_trip.js b/packages/google-maps-fleetengine/samples/generated/v1/trip_service.get_trip.js index d7fda9d901d8..d5d72570e185 100644 --- a/packages/google-maps-fleetengine/samples/generated/v1/trip_service.get_trip.js +++ b/packages/google-maps-fleetengine/samples/generated/v1/trip_service.get_trip.js @@ -50,13 +50,6 @@ function main(name) { * If a minimum is unspecified, the route data are always retrieved. */ // const currentRouteSegmentVersion = {} - /** - * Indicates the minimum timestamp (exclusive) for which - * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this - * timestamp, the `remaining_waypoints` are not set in the response. If this - * field is unspecified, `remaining_waypoints` is always retrieved. - */ - // const remainingWaypointsVersion = {} /** * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default diff --git a/packages/google-maps-fleetengine/samples/package.json b/packages/google-maps-fleetengine/samples/package.json index bcad83608748..44e7fb5e09e0 100644 --- a/packages/google-maps-fleetengine/samples/package.json +++ b/packages/google-maps-fleetengine/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/fleetengine": "^0.7.0" + "@googlemaps/fleetengine": "^0.8.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-fleetengine/src/v1/trip_service_client.ts b/packages/google-maps-fleetengine/src/v1/trip_service_client.ts index 6524e61594b0..86caf4de579b 100644 --- a/packages/google-maps-fleetengine/src/v1/trip_service_client.ts +++ b/packages/google-maps-fleetengine/src/v1/trip_service_client.ts @@ -515,10 +515,10 @@ export class TripServiceClient { * unchanged since this timestamp, the route field is not set in the response. * If a minimum is unspecified, the route data are always retrieved. * @param {google.protobuf.Timestamp} request.remainingWaypointsVersion - * Indicates the minimum timestamp (exclusive) for which - * `Trip.remaining_waypoints` are retrieved. If they are unchanged since this - * timestamp, the `remaining_waypoints` are not set in the response. If this - * field is unspecified, `remaining_waypoints` is always retrieved. + * Deprecated: `Trip.remaining_waypoints` are always retrieved. Use + * `remaining_waypoints_route_version` to control when + * `Trip.remaining_waypoints.traffic_to_waypoint` and + * `Trip.remaining_waypoints.path_to_waypoint` data are retrieved. * @param {maps.fleetengine.v1.PolylineFormatType} request.routeFormatType * The returned current route format, `LAT_LNG_LIST_TYPE` (in `Trip.route`), * or `ENCODED_POLYLINE_TYPE` (in `Trip.current_route_segment`). The default diff --git a/packages/google-maps-fleetengine/v1/protos/google/maps/fleetengine/delivery/v1/common.proto b/packages/google-maps-fleetengine/v1/protos/google/maps/fleetengine/delivery/v1/common.proto index 01a62c0b35e5..88ceee249040 100644 --- a/packages/google-maps-fleetengine/v1/protos/google/maps/fleetengine/delivery/v1/common.proto +++ b/packages/google-maps-fleetengine/v1/protos/google/maps/fleetengine/delivery/v1/common.proto @@ -144,6 +144,19 @@ message DeliveryVehicleLocation { // Accuracy of `raw_location` as a radius, in meters. google.protobuf.DoubleValue raw_location_accuracy = 25; + // The location from Android's Fused Location Provider. + google.type.LatLng flp_location = 29; + + // Update timestamp of the `flp_location` + google.protobuf.Timestamp flp_update_time = 30; + + // Accuracy of `flp_location` in meters as a radius. + google.protobuf.DoubleValue flp_latlng_accuracy_meters = 31; + + // Direction the vehicle is moving in degrees, as determined by the Fused + // Location Provider. 0 represents North. The valid range is [0,360). + google.protobuf.Int32Value flp_heading_degrees = 32; + // Supplemental location provided by the integrating app. google.type.LatLng supplemental_location = 18; diff --git a/packages/google-maps-fleetengine/v1/protos/protos.d.ts b/packages/google-maps-fleetengine/v1/protos/protos.d.ts index 1b12a2a87cc1..41da21e3b8ed 100644 --- a/packages/google-maps-fleetengine/v1/protos/protos.d.ts +++ b/packages/google-maps-fleetengine/v1/protos/protos.d.ts @@ -222,6 +222,18 @@ export namespace maps { /** DeliveryVehicleLocation rawLocationAccuracy */ rawLocationAccuracy?: (google.protobuf.IDoubleValue|null); + /** DeliveryVehicleLocation flpLocation */ + flpLocation?: (google.type.ILatLng|null); + + /** DeliveryVehicleLocation flpUpdateTime */ + flpUpdateTime?: (google.protobuf.ITimestamp|null); + + /** DeliveryVehicleLocation flpLatlngAccuracyMeters */ + flpLatlngAccuracyMeters?: (google.protobuf.IDoubleValue|null); + + /** DeliveryVehicleLocation flpHeadingDegre{"code":"deadline_exceeded","msg":"operation timed out"}